为什么所有控件都是粗体? [英] Why are all controls bold?
问题描述
昨天我自新年以来第一次打开了我的项目。
我知道在新的一年之前我正在使用自己的TabControl样式。
我还清理了我的programmcode并将所有资源放在一个ResourceDictionary中。
新标签/文本框/按钮..也受到影响,我是否真的更改了SystemResource?
如何将其更改为标准值?
我有一个项目副本没有问题,但它的年龄大约1个月(只有xaml更改)。
*只有TabItems的子元素是粗体,任何人都可以解释为什么?我该如何避免这种情况?
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?
<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.
推荐答案
您正在尝试执行非常基本的样式,这无法帮助您区分诸如TextItem
的标题之类的细节。要解决这些问题,你需要了解一般的WPF模板和样式主题。
你可以从这里开始: https://msdn.microsoft.com/en-us/library/ms745683%28v=vs.110%29.aspx [ ^ ]。
请参阅专门讨论TabItem
样式的文章:http://www.wpf-tutorial.com/tabcontrol/styling-the-tabitems [ ^ ]。
-SA
You are trying to do very basic styling which cannot help you to distinguish such detail as the title ofTextItem
. 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 theTabItem
styling: http://www.wpf-tutorial.com/tabcontrol/styling-the-tabitems[^].
—SA
这篇关于为什么所有控件都是粗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!