WPF, need style for tab control to look like VS2008 tabs

M

moondaddy

I'm using c# 3.5 and wpf, and need to know how to create a style or control
template to make the tabs in the tab contorl look like the tabs in VS 2008.

Any code samples?

Thanks.
 
M

Marco Zhou [MSFT]

Hello George,

Welcome back!

I cannot find any sample on how to customize the TabControl to make it look
like the one in Visual Studio, so I spend several hours mocking up a sample:

You could download the sample at the following location:
http://cid-fd9a0f1f8dd06954.skydrive.live.com/self.aspx/Public/Code Sample
s/WPF/TabControlStylingDemo.zip

This sample is a quick example, and use too much hardcoding, you need to
tweak the TabChrome code to make it more general-purpose.
If you have any question conerning the sample, feel free to post back here.

--------------------------------------------------
Best regards,
Macro Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

moondaddy

Hey thanks for all the work you put into this as it's a real eye-opener! I
have a couple of questions:

1) what do you mean "to make it more general purpose". this look pretty
general purpose as it's automatically applied to the tab control.

2) How is this automatically applied to the tab control when it's not
referenced in the tab control as a control template or anything?

I'm going to have to spend some time studying the geometry to understand how
to tweak it. Thanks again this is really cool.
 
M

Marco Zhou [MSFT]

Hi George,

I've send your an email containg the final working example and some
explanation, please check it out.

--------------------------------------------------
Best regards,
Macro Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top