Skip to content

Commit cdee8e0

Browse files
committed
Update Theme.xaml
1 parent bb27099 commit cdee8e0

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/WPFDevelopers.Net40/Themes/Theme.xaml

+26-3
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,9 @@
948948
</ControlTemplate.Triggers>
949949
</ControlTemplate>
950950
<Style x:Key="WD.DefaultMenuItem" BasedOn="{StaticResource WD.ControlBasicStyle}" TargetType="{x:Type MenuItem}">
951+
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=Menu}, Path=FontSize}" />
952+
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=Menu}, Path=FontWeight}" />
953+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=Menu}, Path=FontFamily}" />
951954
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}" />
952955
<Style.Triggers>
953956
<Trigger Property="Role" Value="TopLevelHeader">
@@ -1817,6 +1820,8 @@
18171820
<Setter Property="BorderThickness" Value="0" />
18181821
<Setter Property="Background" Value="{DynamicResource WD.PlaceholderTextBrush}" />
18191822
<Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
1823+
<Setter Property="FontFamily" Value="{Binding FontFamily, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
1824+
<Setter Property="FontWeight" Value="{Binding FontWeight, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
18201825
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
18211826
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
18221827
<Setter Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
@@ -2384,6 +2389,7 @@
23842389
<Setter Property="BorderBrush" Value="Transparent" />
23852390
<Setter Property="Background" Value="Transparent" />
23862391
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontSize}" />
2392+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontFamily}" />
23872393
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontWeight}" />
23882394
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGrid}}}" />
23892395
<Setter Property="Template">
@@ -2413,6 +2419,7 @@
24132419
<Setter Property="BorderBrush" Value="{DynamicResource WD.BaseBrush}" />
24142420
<Setter Property="Background" Value="{DynamicResource WD.BackgroundBrush}" />
24152421
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontSize}" />
2422+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontFamily}" />
24162423
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontWeight}" />
24172424
<Setter Property="ValidationErrorTemplate">
24182425
<Setter.Value>
@@ -2489,6 +2496,7 @@
24892496
<Setter Property="HorizontalContentAlignment" Value="Left" />
24902497
<Setter Property="HorizontalAlignment" Value="Center" />
24912498
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontSize}" />
2499+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontFamily}" />
24922500
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontWeight}" />
24932501
<Setter Property="Template">
24942502
<Setter.Value>
@@ -2532,6 +2540,7 @@
25322540
<Setter Property="BorderBrush" Value="{DynamicResource WD.BaseBrush}" />
25332541
<Setter Property="BorderThickness" Value="0,0,0,1" />
25342542
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontSize}" />
2543+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontFamily}" />
25352544
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=FontWeight}" />
25362545
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGrid}}}" />
25372546
<Setter Property="Template">
@@ -3175,6 +3184,9 @@
31753184
<Setter Property="Background" Value="Transparent" />
31763185
<Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextBrush}" />
31773186
<Setter Property="BorderBrush" Value="{DynamicResource WD.BaseBrush}" />
3187+
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=ListBox}, Path=FontSize}" />
3188+
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=ListBox}, Path=FontWeight}" />
3189+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=ListBox}, Path=FontFamily}" />
31783190
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}" />
31793191
<Setter Property="Template">
31803192
<Setter.Value>
@@ -3248,10 +3260,12 @@
32483260
<Style x:Key="WD.DefaultGridViewColumnHeader" BasedOn="{StaticResource WD.ControlBasicStyle}" TargetType="{x:Type GridViewColumnHeader}">
32493261
<Setter Property="HorizontalContentAlignment" Value="Left" />
32503262
<Setter Property="VerticalContentAlignment" Value="Center" />
3251-
<Setter Property="FontWeight" Value="ExtraBlack" />
32523263
<Setter Property="Background" Value="{DynamicResource WD.BackgroundBrush}" />
32533264
<Setter Property="BorderBrush" Value="{DynamicResource WD.BaseBrush}" />
32543265
<Setter Property="BorderThickness" Value="0,0,0,1" />
3266+
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=ListView}, Path=FontSize}" />
3267+
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=ListView}, Path=FontWeight}" />
3268+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=ListView}, Path=FontFamily}" />
32553269
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}" />
32563270
<Setter Property="Template">
32573271
<Setter.Value>
@@ -3321,6 +3335,9 @@
33213335
<Setter Property="Background" Value="Transparent" />
33223336
<Setter Property="BorderBrush" Value="{DynamicResource WD.BaseBrush}" />
33233337
<Setter Property="BorderThickness" Value="0,0,0,1" />
3338+
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=ListView}, Path=FontSize}" />
3339+
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=ListView}, Path=FontWeight}" />
3340+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=ListView}, Path=FontFamily}" />
33243341
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}" />
33253342
<Setter Property="Template">
33263343
<Setter.Value>
@@ -3522,6 +3539,9 @@
35223539
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
35233540
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}" />
35243541
<Setter Property="FocusVisualStyle" Value="{StaticResource WD.TreeViewItemFocusVisual}" />
3542+
<Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType=TreeView}, Path=FontSize}" />
3543+
<Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType=TreeView}, Path=FontWeight}" />
3544+
<Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType=TreeView}, Path=FontFamily}" />
35253545
<Setter Property="Template">
35263546
<Setter.Value>
35273547
<ControlTemplate TargetType="{x:Type TreeViewItem}">
@@ -5484,12 +5504,15 @@
54845504
<Setter Property="Margin" Value="1,0" />
54855505
<Setter Property="helpers:ElementHelper.CornerRadius" Value="{Binding Path=(helpers:ElementHelper.CornerRadius), RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
54865506
<Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}" />
5507+
<Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource AncestorType={x:Type controls:MultiSelectComboBoxItem}}}" />
5508+
<Setter Property="FontFamily" Value="{Binding FontFamily, RelativeSource={RelativeSource AncestorType={x:Type controls:MultiSelectComboBoxItem}}}" />
5509+
<Setter Property="FontWeight" Value="{Binding FontWeight, RelativeSource={RelativeSource AncestorType={x:Type controls:MultiSelectComboBoxItem}}}" />
54875510
<Setter Property="Template">
54885511
<Setter.Value>
54895512
<ControlTemplate TargetType="{x:Type controls:MultiSelectComboBoxItem}">
54905513
<Border x:Name="PART_Border" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding Path=(helpers:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" SnapsToDevicePixels="true">
54915514
<CheckBox MinHeight="{TemplateBinding MinHeight}" HorizontalAlignment="Stretch" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" helpers:ElementHelper.CornerRadius="{Binding Path=(helpers:ElementHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
5492-
<ContentPresenter x:Name="PART_ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" TextElement.Foreground="{TemplateBinding Foreground}" />
5515+
<ContentPresenter x:Name="PART_ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" TextElement.FontFamily="{TemplateBinding FontFamily}" TextElement.FontSize="{TemplateBinding FontSize}" TextElement.Foreground="{TemplateBinding Foreground}" />
54935516
</CheckBox>
54945517
</Border>
54955518
<ControlTemplate.Triggers>
@@ -5535,7 +5558,7 @@
55355558
<TextBox Name="PART_EditableTextBox" Padding="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Panel.ZIndex="1" Background="Transparent" Focusable="True" Foreground="{DynamicResource WD.PrimaryTextBrush}" IsReadOnly="True" SelectionBrush="{DynamicResource WD.WindowBorderBrush}" Style="{x:Null}" Template="{StaticResource WD.ComboBoxTextBox}" Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
55365559
<TextBlock x:Name="PART_Watermark" Padding="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="Transparent" FontSize="{StaticResource WD.PrimaryFontSize}" Foreground="{DynamicResource WD.RegularTextBrush}" IsHitTestVisible="False" Text="{Binding Path=(helpers:ElementHelper.Watermark), RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" TextTrimming="CharacterEllipsis" Visibility="Collapsed" />
55375560
<ToggleButton x:Name="PART_ToggleButton" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" ClickMode="Press" Focusable="False" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{x:Null}" Template="{StaticResource WD.ComboBoxToggleButton}" />
5538-
<Popup x:Name="PART_Popup" AllowsTransparency="True" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_Border}" StaysOpen="False" Focusable="True">
5561+
<Popup x:Name="PART_Popup" AllowsTransparency="True" Focusable="True" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_Border}" StaysOpen="False">
55395562
<controls:SmallPanel x:Name="PART_DropDown" MinWidth="{TemplateBinding FrameworkElement.ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" Margin="24,2,24,24" RenderTransformOrigin=".5,0" SnapsToDevicePixels="True">
55405563
<controls:SmallPanel.RenderTransform>
55415564
<ScaleTransform ScaleY="0" />

0 commit comments

Comments
 (0)