简体   繁体   English

在MahApps.Metro Expander控件中使用正常大小写

[英]Use normal case in MahApps.Metro Expander controls

In version 1.5 of MahApps.Metro, the default style of the Expander control has all characters in its header be uppercase by default. 在MahApps.Metro的1.5版中,默认情况下, Expander控件的样式使标头中的所有字符均为大写。 How does one change this behaviour? 如何改变这种行为?

Guided by this StackOverflow post which deals with the similar question for Button s (whose behaviour is similar, but not quite the same), the source code for the control , and IntelliSense, it turns out that one can modify ControlsHelper.ContentCharacterCasing to obtain the desired effect. 此StackOverflow帖子的指导下,它处理有关Button的类似问题(其行为相似,但不完全相同), 该控件源代码和IntelliSense,事实证明,可以修改ControlsHelper.ContentCharacterCasing以获取该内容。预期的效果。 In particular, the following style gives an Expander that is identical to the Metro styled one, but with normal casing: 特别是,以下样式提供的Expander与Metro样式的Expander相同,但具有普通大小写:

<Style x:Key="MetroExpanderWithNormalCase" TargetType="Expander" BasedOn="{StaticResource MetroExpander}">
    <Setter Property="controls:ControlsHelper.ContentCharacterCasing" Value="Normal"/>
</Style>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM