Answered by:
Custom tabcontrol at design time in WPF

Question
-
I want to create a tab control with background and tabs header with different colors at design time. Is it possible in WPF?
At design time, I want to add the tabs (Custom Tabpage) in Tab control (Custom tabcontrol)
Any help will be appreciated
Tuesday, April 30, 2013 9:37 AM
Answers
-
You can modify the control template of the TabITem or write a style for TabITem to do this and go on addind tabitems in xaml <TabItem/> as much as you like. A tool like Expression Blend comes in very handy for such things. Take a look at : http://tech.pro/tutorial/730/the-wpf-tab-control-inside-and-out
Please Mark as Answered If this answers your question Or UnMark as Answered if it did not.
Happy to Help :)
My SiteTuesday, April 30, 2013 10:12 AM -
There's a collection editor, I suppose maybe this isn't so obvious though.
This is specifically for vs2010 but vs2012 will be similar.
Drag a tab control onto a window.
Click on it to give it focus.
You might have to try different places, but eventually you should see a square in the top left corner with kind of arrows in it.
Right click on it.
Choose properties from the pop up menu thing.
In the properties window thing ( bottom right of vs by default ) you should see items.
It's a collection.
Pick each and do your settings.
These will over-ride any default style, so you could have a default style giving it the right shape or whatever that you like for all your tab items and then set just the colour as I describe.
Or any number of combinations.
Tuesday, April 30, 2013 11:54 AM
All replies
-
You can modify the control template of the TabITem or write a style for TabITem to do this and go on addind tabitems in xaml <TabItem/> as much as you like. A tool like Expression Blend comes in very handy for such things. Take a look at : http://tech.pro/tutorial/730/the-wpf-tab-control-inside-and-out
Please Mark as Answered If this answers your question Or UnMark as Answered if it did not.
Happy to Help :)
My SiteTuesday, April 30, 2013 10:12 AM -
There's a collection editor, I suppose maybe this isn't so obvious though.
This is specifically for vs2010 but vs2012 will be similar.
Drag a tab control onto a window.
Click on it to give it focus.
You might have to try different places, but eventually you should see a square in the top left corner with kind of arrows in it.
Right click on it.
Choose properties from the pop up menu thing.
In the properties window thing ( bottom right of vs by default ) you should see items.
It's a collection.
Pick each and do your settings.
These will over-ride any default style, so you could have a default style giving it the right shape or whatever that you like for all your tab items and then set just the colour as I describe.
Or any number of combinations.
Tuesday, April 30, 2013 11:54 AM