Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ContentDialog CornerRadius #1405

Merged
merged 3 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions MUXControls.sln
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ Global
dev\CommandBarFlyout\CommandBarFlyout.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\CommonStyles\CommonStyles.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\Common\Common.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\ContentDialog\ContentDialog.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\DatePicker\DatePicker.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\DropDownButton\DropDownButton.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
dev\Effects\Microsoft.UI.Composition.Effects.vcxitems*{ad0c90b0-4845-4d4b-88f1-86f653f8171b}*SharedItemsImports = 4
Expand Down
16 changes: 11 additions & 5 deletions dev/ContentDialog/ContentDialog_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
<Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
<StaticResource x:Key="ContentDialogForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
<StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<contract7NotPresent:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<contract7Present:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<StaticResource x:Key="ContentDialogBorderBrush" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="ContentDialogLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
<SolidColorBrush x:Key="ContentDialogBackgroundThemeBrush" Color="LightGray" />
Expand All @@ -34,8 +35,9 @@
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="ContentDialogForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
<StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlBackgroundAltHighBrush" />
<StaticResource x:Key="ContentDialogBorderBrush" ResourceKey="SystemControlForegroundAccentBrush" />
<contract7NotPresent:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<contract7Present:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<StaticResource x:Key="ContentDialogBorderBrush" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="ContentDialogLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
<x:Double x:Key="ContentDialogMinWidth">320</x:Double>
<x:Double x:Key="ContentDialogMaxWidth">548</x:Double>
Expand All @@ -53,7 +55,7 @@
<Thickness x:Key="ContentDialogContentScrollViewerMargin">0,0,0,0</Thickness>
<Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
<Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
<StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<SolidColorBrush x:Key="ContentDialogBackgroundThemeBrush" Color="{ThemeResource SystemColorButtonTextColor}" />
<SolidColorBrush x:Key="ContentDialogBorderThemeBrush" Color="{ThemeResource SystemAccentColor}" />
<SolidColorBrush x:Key="ContentDialogContentForegroundBrush" Color="Black" />
<SolidColorBrush x:Key="ContentDialogDimmingThemeBrush" Color="{ThemeResource SystemColorHighlightColor}" />
Expand All @@ -77,7 +79,8 @@
<Thickness x:Key="ContentDialogTitleMargin">0,0,0,12</Thickness>
<Thickness x:Key="ContentDialogPadding">24,18,24,24</Thickness>
<StaticResource x:Key="ContentDialogForeground" ResourceKey="SystemControlPageTextBaseHighBrush" />
<StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<contract7NotPresent:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<contract7Present:StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundAltHighBrush" />
<StaticResource x:Key="ContentDialogBorderBrush" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="ContentDialogLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />
<SolidColorBrush x:Key="ContentDialogBackgroundThemeBrush" Color="LightGray" />
Expand All @@ -95,6 +98,9 @@
<Setter Property="Background" Value="{ThemeResource ContentDialogBackground}" />
<Setter Property="BorderBrush" Value="{ThemeResource ContentDialogBorderBrush}" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="PrimaryButtonStyle" Value="{ThemeResource DefaultButtonStyle}" />
<Setter Property="SecondaryButtonStyle" Value="{ThemeResource DefaultButtonStyle}" />
<Setter Property="CloseButtonStyle" Value="{ThemeResource DefaultButtonStyle}" />
<contract7Present:Setter Property="CornerRadius" Value="{ThemeResource OverlayCornerRadius}" />
<Setter Property="Template">
<Setter.Value>
Expand Down
2 changes: 1 addition & 1 deletion dev/ContentDialog/TestUI/ContentDialogPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public ContentDialogPage()

private void ShowDialog_Click(object sender, RoutedEventArgs e)
{
var dialog = new ContentDialog { Title = "Title", Content = "Content", IsPrimaryButtonEnabled = true, PrimaryButtonText = "PrimaryButton" };
var dialog = new ContentDialog { Title = "Title", Content = "Content", IsPrimaryButtonEnabled = true, PrimaryButtonText = "PrimaryButton", SecondaryButtonText = "SecondaryButton", CloseButtonText = "CloseButton" };
_ = dialog.ShowAsync();
}
}
Expand Down
1 change: 1 addition & 0 deletions dev/dll/Microsoft.UI.Xaml.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
<Import Project="..\ScrollBar\ScrollBar.vcxitems" Label="Shared" Condition="$(FeatureScrollBarEnabled) == 'true' Or $(FeatureScrollBarEnabled) == 'productOnly'" />
<Import Project="..\CalendarView\CalendarView.vcxitems" Label="Shared" Condition="$(FeatureScrollBarEnabled) == 'true' Or $(FeatureScrollBarEnabled) == 'productOnly'" />
<Import Project="..\SplitView\SplitView.vcxitems" Label="Shared" Condition="$(FeatureScrollBarEnabled) == 'true' Or $(FeatureScrollBarEnabled) == 'productOnly'" />
<Import Project="..\ContentDialog\ContentDialog.vcxitems" Label="Shared" Condition="$(FeatureContentDialogEnabled) == 'true' Or $(FeatureContentDialogEnabled) == 'productOnly'" />
</ImportGroup>
<ItemGroup>
<SharedPage Include="@(Page)" />
Expand Down
28 changes: 14 additions & 14 deletions test/MUXControlsTestApp/master/ContentDialog-5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Padding=0,0,0,0
Foreground=#FF000000
BorderThickness=0,0,0,0
BorderBrush=#FF0078D7
Background=#FFFFFFFF
BorderBrush=#33000000
Background=#FFF2F2F2
Margin=0,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
Expand Down Expand Up @@ -56,10 +56,10 @@
RenderSize=0,0
[Windows.UI.Xaml.Controls.Border]
Padding=0,0,0,0
CornerRadius=0,0,0,0
CornerRadius=4,4,4,4
BorderThickness=1,1,1,1
BorderBrush=#FF0078D7
Background=#FFFFFFFF
BorderBrush=#33000000
Background=#FFF2F2F2
Name=BackgroundElement
MinWidth=320
MinHeight=184
Expand Down Expand Up @@ -93,7 +93,7 @@
BorderBrush=#00FFFFFF
Background=#00FFFFFF
Name=ContentScrollViewer
Margin=0,0,0,24
Margin=0,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
Expand All @@ -107,15 +107,15 @@
BorderBrush=[NULL]
Background=[NULL]
Name=CommandSpace
Margin=0,0,0,0
Margin=0,24,0,0
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Visible
Visibility=Collapsed
RenderSize=0,0
[Windows.UI.Xaml.Controls.Button]
Padding=8,4,8,4
Padding=8,5,8,5
Foreground=#FF000000
BorderThickness=1,1,1,1
BorderBrush=#00FFFFFF
Expand All @@ -126,10 +126,10 @@
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Collapsed
Visibility=Visible
RenderSize=0,0
[Windows.UI.Xaml.Controls.Button]
Padding=8,4,8,4
Padding=8,5,8,5
Foreground=#FF000000
BorderThickness=1,1,1,1
BorderBrush=#00FFFFFF
Expand All @@ -140,10 +140,10 @@
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Collapsed
Visibility=Visible
RenderSize=0,0
[Windows.UI.Xaml.Controls.Button]
Padding=8,4,8,4
Padding=8,5,8,5
Foreground=#FF000000
BorderThickness=1,1,1,1
BorderBrush=#00FFFFFF
Expand All @@ -154,5 +154,5 @@
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Collapsed
Visibility=Visible
RenderSize=0,0
158 changes: 0 additions & 158 deletions test/MUXControlsTestApp/master/ContentDialog-6.xml

This file was deleted.

10 changes: 5 additions & 5 deletions test/MUXControlsTestApp/master/ContentDialog-7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
BorderThickness=0,0,0,0
BorderBrush=#33000000
Background=#FFFFFFFF
CornerRadius=0,0,0,0
CornerRadius=4,4,4,4
Margin=0,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
Expand Down Expand Up @@ -57,7 +57,7 @@
RenderSize=0,0
[Windows.UI.Xaml.Controls.Border]
Padding=0,0,0,0
CornerRadius=0,0,0,0
CornerRadius=4,4,4,4
BorderThickness=1,1,1,1
BorderBrush=#33000000
Background=#FFFFFFFF
Expand Down Expand Up @@ -122,7 +122,7 @@
BorderThickness=1,1,1,1
BorderBrush=#00FFFFFF
Background=#33000000
CornerRadius=0,0,0,0
CornerRadius=2,2,2,2
Name=PrimaryButton
Margin=0,0,2,0
FocusVisualSecondaryThickness=1,1,1,1
Expand All @@ -137,7 +137,7 @@
BorderThickness=1,1,1,1
BorderBrush=#00FFFFFF
Background=#33000000
CornerRadius=0,0,0,0
CornerRadius=2,2,2,2
Name=SecondaryButton
Margin=2,0,2,0
FocusVisualSecondaryThickness=1,1,1,1
Expand All @@ -152,7 +152,7 @@
BorderThickness=1,1,1,1
BorderBrush=#00FFFFFF
Background=#33000000
CornerRadius=0,0,0,0
CornerRadius=2,2,2,2
Name=CloseButton
Margin=2,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
Expand Down
4 changes: 2 additions & 2 deletions test/MUXControlsTestApp/master/ContentDialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Padding=0,0,0,0
Foreground=#FF000000
BorderThickness=0,0,0,0
BorderBrush=#FF0078D7
Background=#FFFFFFFF
BorderBrush=#33000000
Background=#FFF2F2F2
MaxWidth=548
MaxHeight=756
Margin=0,0,0,0
Expand Down