Skip to content
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

Port microsoft/microsoft-ui-xaml#4862 #652

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions ModernWpf/Styles/TextStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,43 @@

<Style x:Key="BaseTextBlockStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamilyKey}}" />
<Setter Property="FontSize" Value="{StaticResource BodyTextBlockFontSize}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="LineStackingStrategy" Value="MaxHeight" />
<!--<Setter Property="TextLineBounds" Value="Full" />-->
<!--<Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />-->
</Style>

<Style x:Key="CaptionTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
<Setter Property="FontSize" Value="{StaticResource CaptionTextBlockFontSize}" />
<Setter Property="FontWeight" Value="Normal" />
<!--<Setter Property="OpticalMarginAlignment" Value="None" />-->
</Style>

<Style x:Key="BodyTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
<Setter Property="FontSize" Value="{StaticResource BodyTextBlockFontSize}" />
<Setter Property="FontWeight" Value="Normal" />
<!--<Setter Property="OpticalMarginAlignment" Value="None" />-->
</Style>

<Style x:Key="BodyStrongTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextBlockStyle}">
<Setter Property="FontWeight" Value="SemiBold" />
</Style>
<Style x:Key="BodyStrongTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextBlockStyle}" />

<Style x:Key="SubtitleTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
<Setter Property="FontSize" Value="{StaticResource SubtitleTextBlockFontSize}" />
<Setter Property="FontWeight" Value="SemiBold" />
<!--<Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />-->
</Style>

<Style x:Key="TitleTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
<Setter Property="FontSize" Value="{StaticResource TitleTextBlockFontSize}" />
<Setter Property="FontWeight" Value="SemiBold" />
<!--<Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />-->
</Style>

<Style x:Key="TitleLargeTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
<Setter Property="FontSize" Value="{StaticResource TitleLargeTextBlockFontSize}" />
<Setter Property="FontWeight" Value="SemiBold" />
<!--<Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />-->
</Style>

<Style x:Key="DisplayTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
<Setter Property="FontSize" Value="{StaticResource DisplayTextBlockFontSize}" />
<Setter Property="FontWeight" Value="SemiBold" />
<!--<Setter Property="OpticalMarginAlignment" Value="TrimSideBearings" />-->
</Style>

<!-- Legacy styles -->
Expand Down
Loading