Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Yesterday i opened my project the first time since the new year.
I know that i was working on my own TabControl Style before new year.
I also cleaned up my programmcode and put all resources in one ResourceDictionary.

New labels/textboxes/buttons.. are also affected, did I really change a SystemResource?
How can i change it to standard value?

I have a project copy which doesnt have the problem but its ~1month older (only xaml changes).

*Only child elements of the TabItems are bold, can anyone explain me why? And how can i avoid this?

XML
<TabItem Header="Search" x:Name="ti_search" GotFocus="ti_search_GotFocus" Style="{DynamicResource SimpleTabItem}" Margin="14,0,-14,0" Width="184" VerticalAlignment="Top" FontSize="16" FontWeight="Bold">



Thanks for help.
Posted
Updated 22-Feb-15 7:34am
v4
Comments
Sergey Alexandrovich Kryukov 22-Feb-15 8:46am    
What's the use of asking such question without showing a relevant code sample?
—SA
SubbZer 22-Feb-15 8:53am    
Thats the clue, i doesnt change any code.
I worked with Blend, just for creating my own TabControl.
There have to be a clickable option/resource where i can "easily" change the standard value.. any idea?

*I right-clicked the standard TabControl and edited the actual pattern instead of an copy, dont ask my why, first steps with blend.

**OK, i'm sure that i must had changed any code, so the correct question maybe is: where can i change an attribute that affect ALL controls?
Sergey Alexandrovich Kryukov 22-Feb-15 10:15am    
It doesn't matter if you changed anything or not. This is not a clue. No code sample, nothing to talk about.
—SA
SubbZer 22-Feb-15 13:37pm    
Ok, i give you some code, all child elements are effected by FontWeight="Bold".
Now i hope you also can help me.
Sergey Alexandrovich Kryukov 22-Feb-15 13:49pm    
Well, that is a correct behavior. Remove Bold if you want. How can it be a problem?
—SA

1 solution

You are trying to do very basic styling which cannot help you to distinguish such detail as the title of TextItem. To solve such problems, you need to understand general WPF templating and styling topics.

You can start here: https://msdn.microsoft.com/en-us/library/ms745683%28v=vs.110%29.aspx[^].

Please see this article specifically devoted to the TabItem styling: http://www.wpf-tutorial.com/tabcontrol/styling-the-tabitems[^].

—SA
 
Share this answer
 
Comments
Kuthuparakkal 22-Feb-15 17:12pm    
Best possible answer
Sergey Alexandrovich Kryukov 22-Feb-15 17:21pm    
Not sure, but thank you.
—SA
SubbZer 23-Feb-15 5:25am    
Thank you, this will help me a lot! I have never read a styling guide before, just learning by doing and asking.
Sergey Alexandrovich Kryukov 23-Feb-15 8:52am    
You are welcome. Eventually, you really need to learn the manuals.
Good luck, call again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900