Skip to content

Commit

Permalink
Merge branch 'master' into devsecops
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-ivanov committed Dec 15, 2023
2 parents f19da8a + a3eb7ad commit ac2f4c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 29 deletions.
30 changes: 12 additions & 18 deletions ModernWpf/Styles/ContextMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,19 @@
SnapsToDevicePixels="True">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}">
<Grid>
<ScrollViewer
x:Name="ContextMenuScrollViewer"
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
TypeInTargetAssembly={x:Type FrameworkElement}}}"
Margin="{TemplateBinding Padding}"
MinWidth="{DynamicResource FlyoutThemeMinWidth}">
<ItemsPresenter
RenderOptions.ClearTypeHint="Enabled"
KeyboardNavigation.DirectionalNavigation="Cycle"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
<Border
x:Name="ContextMenuBorder"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}" />
</Grid>
<ScrollViewer
x:Name="ContextMenuScrollViewer"
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}"
Margin="{TemplateBinding Padding}"
MinWidth="{DynamicResource FlyoutThemeMinWidth}">
<ItemsPresenter
RenderOptions.ClearTypeHint="Enabled"
KeyboardNavigation.DirectionalNavigation="Cycle"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
</primitives:ThemeShadowChrome>
</ControlTemplate>
Expand Down
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

0 comments on commit ac2f4c3

Please sign in to comment.