In version 1.5 of MahApps.Metro, the default style of the Expander
control has all characters in its header be uppercase by default. How does one change this behaviour?
Asked
Active
Viewed 1,828 times
1

fuglede
- 17,388
- 2
- 54
- 99
1 Answers
1
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. In particular, the following style gives an Expander
that is identical to the Metro styled one, but with normal casing:
<Style x:Key="MetroExpanderWithNormalCase" TargetType="Expander" BasedOn="{StaticResource MetroExpander}">
<Setter Property="controls:ControlsHelper.ContentCharacterCasing" Value="Normal"/>
</Style>

fuglede
- 17,388
- 2
- 54
- 99
-
Your [source code for the control](https://github.com/MahApps/MahApps.Metro/tree/develop/src/MahApps.Metro/MahApps.MetroMahApps.Metro/Styles/Controls.Expander.xaml) link is broken. – nam Jul 01 '21 at 17:29