New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ControlsHelper.ContentCharacterCasing not working for Label #3699
Labels
Milestone
Comments
HI @Gerardo-Sista , <Style TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Label.Text}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Label}">
<mah:ContentControlEx x:Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentCharacterCasing="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(mah:ControlsHelper.ContentCharacterCasing)}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> Happy coding |
punker76
pushed a commit
to timunie/MahApps.Metro
that referenced
this issue
Nov 30, 2019
punker76
added a commit
to timunie/MahApps.Metro
that referenced
this issue
Nov 30, 2019
…elf is already a ContentControl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
in MahApps v2 if I set
<Label mah:ControlsHelper.ContentCharacterCasing="Upper" Content="{lng:Language Key=WarningsContent}" />
the casing of bound text remains the same as was set in the bound value (lowercase)
Is it normal?
For completeness on labels is applied this simple style in app.xaml:
Thank you.
The text was updated successfully, but these errors were encountered: