Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Align NumericUpDown style to other controls
  • Loading branch information
michaelmairegger committed Jun 24, 2024
commit 95596e156666bde9242aa2556315cf1d8367de89
12 changes: 11 additions & 1 deletion src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,17 @@
Grid.Column="5"
Style="{StaticResource MaterialDesignOutlinedTimePicker}" />

<materialDesign:NumericUpDown Grid.Row="1" Grid.Column="6"></materialDesign:NumericUpDown>
<materialDesign:NumericUpDown Grid.Row="1" Grid.Column="6" />
<materialDesign:NumericUpDown Grid.Row="2"
Grid.Column="6"
Style="{StaticResource MaterialDesignFloatingHintNumericUpDown}" />
<materialDesign:NumericUpDown Grid.Row="3"
Grid.Column="6"
Style="{StaticResource MaterialDesignFilledNumericUpDown}" />
<materialDesign:NumericUpDown Grid.Row="4"
Grid.Column="6"
Style="{StaticResource MaterialDesignOutlinedNumericUpDown}" />

</Grid>
</StackPanel>
</GroupBox>
Expand Down
8 changes: 4 additions & 4 deletions src/MaterialDesignThemes.Wpf/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
xmlns:local="clr-namespace:MaterialDesignThemes.Wpf"
xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:transitions="clr-namespace:MaterialDesignThemes.Wpf.Transitions"
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf">
xmlns:transitions="clr-namespace:MaterialDesignThemes.Wpf.Transitions">

<ResourceDictionary.MergedDictionaries>
<!--
we only bring in the dictionaries for controls which were "invented"
as part of Material Design in XAML Toolkit. Other themes, for existing controls
must be selected manually by the user, so that they override default styles.
The easiest way to do this is include:

MaterialDesignTheme.Defaults.xaml
in your App.xaml
-->
Expand Down Expand Up @@ -43,6 +42,7 @@
<Style TargetType="{x:Type local:TimePicker}" BasedOn="{StaticResource MaterialDesignTimePicker}" />
<Style TargetType="{x:Type local:AutoSuggestBox}" BasedOn="{StaticResource MaterialDesignAutoSuggestBox}" />
<Style TargetType="{x:Type local:SplitButton}" BasedOn="{StaticResource MaterialDesignRaisedSplitButton}" />
<Style TargetType="{x:Type local:NumericUpDown}" BasedOn="{StaticResource MaterialDesignNumericUpDown}" />

<converters:BrushToRadialGradientBrushConverter x:Key="BrushToRadialGradientBrushConverter" />
<converters:DrawerOffsetConverter x:Key="DrawerOffsetConverter" />
Expand Down Expand Up @@ -332,7 +332,7 @@
<Setter TargetName="ComponentOneTwoWrapper" Property="Opacity" Value=".56" />
<Setter TargetName="ComponentThreeTextBlock" Property="Opacity" Value="1" />
</Trigger>
<Trigger Property="wpf:CalendarAssist.Orientation" Value="Horizontal">
<Trigger Property="local:CalendarAssist.Orientation" Value="Horizontal">
<Setter TargetName="ComponentOneTwoWrapper" Property="Orientation" Value="Vertical" />
</Trigger>
</ControlTemplate.Triggers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Listbox.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListView.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Menu.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.NumericUpDown.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PasswordBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ProgressBar.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Listbox.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListView.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Menu.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.NumericUpDown.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PasswordBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ProgressBar.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml" />
Expand Down
Loading