Mahapps - How to set Proper Case in Titles
New versions:
Window Title
<controls:MetroWindow x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
TitleCharacterCasing="Normal" />
GroupBox
Set a style (option 1) or set a property (option 2)
<!-- Option 1 -->
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource MetroGroupBox}">
<Setter Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal" />
</Style>
<!-- Option 2 -->
<GroupBox Controls:ControlsHelper.ContentCharacterCasing="Normal" />
Credits: @Suplanus & @Oscar Vicente Perez
Old versions:
To set window title case:
Set the TitleCaps
property on your MetroWindow
to false
.
<controls:MetroWindow x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
TitleCaps="False" />
To use title case in groupbox:
Put that TextBlock
in the GroupBox
's header.
<GroupBox>
<GroupBox.Header>
<TextBlock Text="My Group Box"/>
</GroupBox.Header>
Some content
</GroupBox>
TitleCaps="False"
is obsolete, use this code in the Window:
TitleCharacterCasing="Normal"