Skip to content

Commit

Permalink
Tweak ContentDialog style to match the design
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara committed Mar 27, 2020
1 parent d835e29 commit 32c64f1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
1 change: 0 additions & 1 deletion ModernWpf.Controls/ContentDialog/ContentDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@
</Grid.RenderTransform>
<ui:ThemeShadowChrome
x:Name="Shdw"
Depth="64"
IsShadowEnabled="{TemplateBinding IsShadowEnabled}"
Margin="{DynamicResource ContentDialogBorderWidth}"
CornerRadius="{TemplateBinding CornerRadius}" />
Expand Down
14 changes: 6 additions & 8 deletions ModernWpf.SampleApp/ControlPages/ContentDialogExample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
Title="Save your work?"
PrimaryButtonText="Save"
SecondaryButtonText="Don't Save"
DefaultButton="Secondary">
CloseButtonText="Cancel"
DefaultButton="Primary"
IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">

<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<!-- Content body -->
<TextBlock
Text="Lorem ipsum dolor sit amet, adipisicing elit."
TextWrapping="Wrap" />
<CheckBox Content="Upload your content to the cloud." />
<TextBlock Text="Lorem ipsum dolor sit amet, adipisicing elit." TextWrapping="Wrap" />
<CheckBox Content="Upload your content to the cloud."/>
</StackPanel>

</ui:ContentDialog>
2 changes: 1 addition & 1 deletion ModernWpf/ThemeResources/Dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@
<Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
<Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
<m:StaticResource x:Key="ContentDialogForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
<m:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<m:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<m:StaticResource x:Key="ContentDialogBorderBrush" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<m:StaticResource x:Key="ContentDialogLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
<SolidColorBrush x:Key="ContentDialogShadowBackground" Color="#5C000000" />
Expand Down
2 changes: 1 addition & 1 deletion ModernWpf/ThemeResources/HighContrast.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
<Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
<Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
<m:StaticResource x:Key="ContentDialogForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
<m:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<m:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<m:StaticResource x:Key="ContentDialogBorderBrush" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<m:StaticResource x:Key="ContentDialogLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
<SolidColorBrush x:Key="ContentDialogShadowBackground" Color="#5C000000" />
Expand Down
2 changes: 1 addition & 1 deletion ModernWpf/ThemeResources/Light.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@
<Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
<Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
<m:StaticResource x:Key="ContentDialogForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
<m:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<m:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<m:StaticResource x:Key="ContentDialogBorderBrush" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<m:StaticResource x:Key="ContentDialogLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
<SolidColorBrush x:Key="ContentDialogShadowBackground" Color="#5C000000" />
Expand Down
3 changes: 2 additions & 1 deletion samples/FluentRibbonSample/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ private async void ShowContentDialog(object sender, RoutedEventArgs e)
PrimaryButtonText = "Yes",
SecondaryButtonText = "No",
CloseButtonText = "Cancel",
DefaultButton = ContentDialogButton.Primary
DefaultButton = ContentDialogButton.Primary,
};
dialog.SetResourceReference(ContentDialog.IsShadowEnabledProperty, SystemParameters.DropShadowKey);
await dialog.ShowAsync();
}
}
Expand Down

0 comments on commit 32c64f1

Please sign in to comment.