Browse Source

FluentTheme: settable ListBoxItem.FontWeight/FontSize (#12958)

pull/12968/head
Julien Lebosquain 3 years ago
committed by GitHub
parent
commit
d43dde504e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml

7
src/Avalonia.Themes.Fluent/Controls/ListBoxItem.xaml

@ -14,9 +14,12 @@
</Border> </Border>
</Design.PreviewWith> </Design.PreviewWith>
<Thickness x:Key="ListBoxItemPadding">12,9,12,12</Thickness> <Thickness x:Key="ListBoxItemPadding">12,9,12,12</Thickness>
<FontWeight x:Key="ListBoxItemFontWeight">Normal</FontWeight>
<ControlTheme x:Key="{x:Type ListBoxItem}" TargetType="ListBoxItem"> <ControlTheme x:Key="{x:Type ListBoxItem}" TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemPadding}" /> <Setter Property="Padding" Value="{DynamicResource ListBoxItemPadding}" />
<Setter Property="FontWeight" Value="{DynamicResource ListBoxItemFontWeight}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<ContentPresenter Name="PART_ContentPresenter" <ContentPresenter Name="PART_ContentPresenter"
@ -26,8 +29,8 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
FontWeight="Normal" FontWeight="{TemplateBinding FontWeight}"
FontSize="{DynamicResource ControlContentThemeFontSize}" FontSize="{TemplateBinding FontSize}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" /> HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />

Loading…
Cancel
Save