Skip to content

Commit

Permalink
Fix Inability To Have Custom Font Sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed Aug 2, 2024
1 parent fce51e5 commit 982230a
Show file tree
Hide file tree
Showing 36 changed files with 69 additions and 42 deletions.
11 changes: 11 additions & 0 deletions src/CrissCross.WPF.UI.Test/Views/Pages/DashboardPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<ui:CheckBoxModern
Grid.Row="1"
Grid.Column="2"
FontSize="20"
Text="I Am A Modern CheckBox" />
<ui:CheckBox
Grid.Row="1"
Expand All @@ -88,5 +89,15 @@
Height="312"
AnimateInDesignMode="True"
Source="/Assets/working.gif" />
<ui:TreeView
Grid.Row="3"
Grid.Column="3"
FontSize="28">
<ui:TreeViewItem Header="Hello">
<ui:TreeViewItem Header="World1" />
<ui:TreeViewItem Header="World2" />
</ui:TreeViewItem>
</ui:TreeView>

</ui:Grid>
</ui:Page>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace CrissCross.WPF.UI.Appearance;
/// </example>
public static class ApplicationThemeManager
{
internal const string LibraryNamespace = "wpf.ui;";
internal const string LibraryNamespace = "crisscross.wpf.ui;";

internal const string ThemesDictionaryPath = "pack://application:,,,/CrissCross.WPF.UI;component/Resources/Theme/";
private static ApplicationTheme _cachedApplicationTheme = ApplicationTheme.Unknown;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="BorderThickness" Value="{StaticResource AutoSuggestBoxBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="ItemContainerStyle" Value="{StaticResource DefaultAutoSuggestBoxItemContainerStyle}" />
<Setter Property="OverridesDefaultStyle" Value="True" />
Expand Down
4 changes: 2 additions & 2 deletions src/CrissCross.WPF.UI/Controls/Button/Button.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
Expand Down Expand Up @@ -89,7 +89,7 @@
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Appearance" Value="Secondary" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/Card/Card.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Focusable" Value="False" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/CardAction/CardAction.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="IsExpanded" Value="False" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/CheckBox/CheckBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="KeyboardNavigation.IsTabStop" Value="True" />
<Setter Property="Focusable" Value="True" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/ComboBox/ComboBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
<Setter Property="Background" Value="{DynamicResource ComboBoxBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource ComboBoxBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="Border.CornerRadius" Value="{DynamicResource PopupCornerRadius}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="DialogMaxHeight" Value="850" />
Expand Down Expand Up @@ -105,7 +105,7 @@
<Style BasedOn="{StaticResource {x:Type TextBlock}}" TargetType="{x:Type TextBlock}">
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
<Setter Property="TextAlignment" Value="Justify" />
<Setter Property="FontSize" Value="14" />
<!--<Setter Property="FontSize" Value="14" />-->
</Style>
</ContentPresenter.Resources>
</ContentPresenter>
Expand Down
4 changes: 2 additions & 2 deletions src/CrissCross.WPF.UI/Controls/DataGrid/DataGrid.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@
<Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="VerticalGridLinesBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontSize" Value="{StaticResource DefaultDataGridFontSize}" />
<!--<Setter Property="FontSize" Value="{StaticResource DefaultDataGridFontSize}" />-->
<Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
Expand Down Expand Up @@ -768,7 +768,7 @@
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="KeyboardNavigation.IsTabStop" Value="True" />
<Setter Property="Focusable" Value="True" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/DatePicker/DatePicker.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</Setter>
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource DatePickerBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/Expander/Expander.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="IsExpanded" Value="False" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Setter Property="MinWidth" Value="518" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Setter Property="MinWidth" Value="518" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Appearance" Value="Secondary" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/InfoBar/InfoBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="{DynamicResource InfoBarBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource InfoBarBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Focusable" Value="False" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/ListBox/ListBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FontSize" Value="14" />
<!--<Setter Property="FontSize" Value="14" />-->
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Style TargetType="{x:Type rxNav:ModernWindow}">
<Setter Property="BackgroundContent" Value="{DynamicResource WindowBackgroundContent}" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Foreground" Value="{DynamicResource WindowForeground}" />
<Setter Property="BorderBrush" Value="{DynamicResource WindowBorder}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="{StaticResource PaneToggleButtonThickness}" />
<Setter Property="FontSize" Value="16" />
<!--<Setter Property="FontSize" Value="16" />-->
<Setter Property="MinHeight" Value="{StaticResource PaneToggleButtonHeight}" />
<Setter Property="MinWidth" Value="{StaticResource PaneToggleButtonWidth}" />
<Setter Property="Padding" Value="10" />
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/NumberBox/NumberBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource NumberBoxBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
Expand Down
4 changes: 2 additions & 2 deletions src/CrissCross.WPF.UI/Controls/PasswordBox/PasswordBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource PasswordBoxBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
Expand Down Expand Up @@ -115,7 +115,7 @@
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource PasswordBoxBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="MinWidth" Value="120" />
<Setter Property="KeyboardNavigation.IsTabStop" Value="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Setter Property="MinHeight" Value="34" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="6,4" />
<Setter Property="FontSize" Value="14" />
<!--<Setter Property="FontSize" Value="14" />-->
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Template">
Expand Down
2 changes: 1 addition & 1 deletion src/CrissCross.WPF.UI/Controls/TextBlock/TextBlock.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<Style TargetType="{x:Type TextBlock}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="FontSize" Value="14" />
<!--<Setter Property="FontSize" Value="14" />-->
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="Focusable" Value="False" />
Expand Down
4 changes: 2 additions & 2 deletions src/CrissCross.WPF.UI/Controls/TextBox/TextBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource TextBoxBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
Expand Down Expand Up @@ -305,7 +305,7 @@
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource TextBoxBorderThemeThickness}" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<!--<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />-->
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
Expand Down
Loading

0 comments on commit 982230a

Please sign in to comment.