Skip to content

Commit

Permalink
Updated background and border of the popup to match Fluent Design gui…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara committed Aug 20, 2020
1 parent f74c8c7 commit 467e8de
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ModernWpf.Controls/NumberBox/NumberBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<Setter Property="Focusable" Value="False" />
<Setter Property="Width" Value="40" />
<Setter Property="Height" Value="32" />
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
<Setter Property="Background" Value="{DynamicResource NumberBoxPopupSpinButtonBackground}" />
<Setter Property="BorderThickness" Value="{DynamicResource NumberBoxPopupSpinButtonBorderThickness}" />
<Setter Property="FontFamily" Value="{DynamicResource SymbolThemeFontFamily}" />
<Setter Property="ContentTemplate">
Expand Down Expand Up @@ -384,9 +384,9 @@
IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">
<Border
x:Name="PopupContentRoot"
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
BorderBrush="{DynamicResource ToolTipBorderBrush}"
BorderThickness="{DynamicResource ToolTipBorderThemeThickness}"
Background="{DynamicResource NumberBoxPopupBackground}"
BorderBrush="{DynamicResource NumberBoxPopupBorderBrush}"
BorderThickness="{DynamicResource NumberBoxPopupBorderThickness}"
CornerRadius="{DynamicResource OverlayCornerRadius}">
<Grid>

Expand Down
7 changes: 7 additions & 0 deletions ModernWpf/ThemeResources/Dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,13 @@

<!-- Resources for NumberBox -->
<m:StaticResource x:Key="NumberBoxPopupIndicatorForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />

<!-- The following NumberBoxPopup* theme resources resource must be defined at the app level in order to take effect. -->
<m:StaticResource x:Key="NumberBoxPopupBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<m:StaticResource x:Key="NumberBoxPopupBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
<Thickness x:Key="NumberBoxPopupBorderThickness">1</Thickness>

<m:StaticResource x:Key="NumberBoxPopupSpinButtonBackground" ResourceKey="SystemControlTransparentBrush" />
<Thickness x:Key="NumberBoxPopupSpinButtonBorderThickness">0</Thickness>

<!-- Resources for PersonPicture -->
Expand Down
7 changes: 7 additions & 0 deletions ModernWpf/ThemeResources/HighContrast.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,13 @@

<!-- Resources for NumberBox -->
<m:StaticResource x:Key="NumberBoxPopupIndicatorForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />

<!-- The following NumberBoxPopup* theme resources resource must be defined at the app level in order to take effect. -->
<m:StaticResource x:Key="NumberBoxPopupBackground" ResourceKey="SystemControlBackgroundBaseHighBrush" />
<m:StaticResource x:Key="NumberBoxPopupBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
<Thickness x:Key="NumberBoxPopupBorderThickness">1</Thickness>

<m:StaticResource x:Key="NumberBoxPopupSpinButtonBackground" ResourceKey="SystemControlTransparentBrush" />
<Thickness x:Key="NumberBoxPopupSpinButtonBorderThickness">2</Thickness>

<!-- Resources for PersonPicture -->
Expand Down
7 changes: 7 additions & 0 deletions ModernWpf/ThemeResources/Light.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,13 @@

<!-- Resources for NumberBox -->
<m:StaticResource x:Key="NumberBoxPopupIndicatorForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />

<!-- The following NumberBoxPopup* theme resources resource must be defined at the app level in order to take effect. -->
<m:StaticResource x:Key="NumberBoxPopupBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<m:StaticResource x:Key="NumberBoxPopupBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
<Thickness x:Key="NumberBoxPopupBorderThickness">1</Thickness>

<m:StaticResource x:Key="NumberBoxPopupSpinButtonBackground" ResourceKey="SystemControlTransparentBrush" />
<Thickness x:Key="NumberBoxPopupSpinButtonBorderThickness">0</Thickness>

<!-- Resources for PersonPicture -->
Expand Down

0 comments on commit 467e8de

Please sign in to comment.