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

Adding styles for the system XAML CommandBarFlyoutCommandBar #4593

Merged
merged 7 commits into from
Apr 1, 2021
11 changes: 11 additions & 0 deletions dev/CommandBarFlyout/CommandBarFlyout.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
<Type>DefaultStyle</Type>
<UseNonstandardCondtionalXAML>true</UseNonstandardCondtionalXAML>
</Page>
<Page Include="$(MSBuildThisFileDirectory)CommandBarFlyoutOS_themeresources.xaml">
<ControlsResourcesVersion>Version2</ControlsResourcesVersion>
<Version>21H1</Version>
<Type>ThemeResources</Type>
</Page>
<Page Include="$(MSBuildThisFileDirectory)CommandBarFlyoutOS_themeresources_v1.xaml">
<ControlsResourcesVersion>Version1</ControlsResourcesVersion>
<Version>21H1</Version>
<Type>ThemeResources</Type>
<UseNonstandardCondtionalXAML>true</UseNonstandardCondtionalXAML>
</Page>
<Page Include="$(MSBuildThisFileDirectory)CommandBarFlyout_themeresources.xaml">
<ControlsResourcesVersion>Version2</ControlsResourcesVersion>
<Version>RS2</Version>
Expand Down
445 changes: 1 addition & 444 deletions dev/CommandBarFlyout/CommandBarFlyout.xaml

Large diffs are not rendered by default.

514 changes: 514 additions & 0 deletions dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources.xaml

Large diffs are not rendered by default.

518 changes: 518 additions & 0 deletions dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources_v1.xaml

Large diffs are not rendered by default.

571 changes: 571 additions & 0 deletions dev/CommandBarFlyout/CommandBarFlyout_themeresources.xaml

Large diffs are not rendered by default.

575 changes: 575 additions & 0 deletions dev/CommandBarFlyout/CommandBarFlyout_themeresources_v1.xaml

Large diffs are not rendered by default.

449 changes: 1 addition & 448 deletions dev/CommandBarFlyout/CommandBarFlyout_v1.xaml

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions dev/CommandBarFlyout/TestUI/CommandBarFlyoutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:contract13Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,13)"
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
Expand Down Expand Up @@ -173,6 +174,20 @@
<AppBarToggleButton x:Name="FavoriteToggleButton9" AutomationProperties.AutomationId="FavoriteToggleButton9" Label="Favorite" Icon="Favorite" Checked="OnElementChecked" Unchecked="OnElementUnchecked" />
</muxc:CommandBarFlyout.SecondaryCommands>
</muxc:CommandBarFlyout>
<contract13Present:CommandBarFlyout Placement="Right" x:Name="Flyout10" AutomationProperties.AutomationId="Flyout10" Opened="OnFlyoutOpened" Closed="OnFlyoutClosed">
<AppBarButton x:Name="CutButton10" AutomationProperties.AutomationId="CutButton10" Label="Cut" Icon="Cut" Click="OnElementClicked" />
<AppBarButton x:Name="CopyButton10" AutomationProperties.AutomationId="CopyButton10" Label="Copy" Icon="Copy" Click="OnElementClicked" />
<AppBarButton x:Name="PasteButton10" AutomationProperties.AutomationId="PasteButton10" Label="Paste" Icon="Paste" Click="OnElementClicked" />
<AppBarButton x:Name="BoldButton10" AutomationProperties.AutomationId="BoldButton10" Label="Bold" Icon="Bold" Click="OnElementClicked" />
<AppBarButton x:Name="ItalicButton10" AutomationProperties.AutomationId="ItalicButton10" Label="Italic" Icon="Italic" Click="OnElementClicked" />
<AppBarButton x:Name="UnderlineButton10" AutomationProperties.AutomationId="UnderlineButton10" Label="Underline" Icon="Underline" Click="OnElementClicked" />
<contract13Present:CommandBarFlyout.SecondaryCommands>
<AppBarButton x:Name="UndoButton10" AutomationProperties.AutomationId="UndoButton10" Label="Undo" Icon="Undo" Click="OnElementClicked" />
<AppBarButton x:Name="RedoButton10" AutomationProperties.AutomationId="RedoButton10" Label="Redo" Icon="Redo" Click="OnElementClicked" />
<AppBarButton x:Name="SelectAllButton10" AutomationProperties.AutomationId="SelectAllButton10" Label="Select all" Click="OnElementClicked" />
<AppBarToggleButton x:Name="FavoriteToggleButton10" AutomationProperties.AutomationId="FavoriteToggleButton10" Label="Favorite" Icon="Favorite" Checked="OnElementChecked" Unchecked="OnElementUnchecked" />
</contract13Present:CommandBarFlyout.SecondaryCommands>
</contract13Present:CommandBarFlyout>
</Grid.Resources>
<ScrollViewer>
<StackPanel>
Expand All @@ -185,6 +200,7 @@
<Button x:Name="FlyoutTarget7" Content="Show CommandBarFlyout with non-focusable primary commands" Margin="10" Click="OnFlyoutTarget7Click" />
<Button x:Name="FlyoutTarget8" Content="Show CommandBarFlyout with no secondary commands" Margin="10" Click="OnFlyoutTarget8Click" />
<Button x:Name="FlyoutTarget9" Content="Show CommandBarFlyout with AlwaysExpanded" Margin="10" Click="OnFlyoutTarget9Click" />
<contract13Present:Button x:Name="FlyoutTarget10" Content="Show Windows.UI.Xaml.Controls.CommandBarFlyout" Margin="10" Click="OnFlyoutTarget10Click" />
<CheckBox x:Name="IsRTLCheckBox" Content="Is Page in RightToLeft FlowDirection?" AutomationProperties.AutomationId="IsRTLCheckBox" Margin="10" Checked="IsRTLCheckBox_Checked" Unchecked="IsRTLCheckBox_Unchecked" />
</StackPanel>
</ScrollViewer>
Expand Down
5 changes: 5 additions & 0 deletions dev/CommandBarFlyout/TestUI/CommandBarFlyoutPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ private void OnFlyoutTarget9Click(object sender, RoutedEventArgs e)
ShowFlyoutAt(Flyout9, FlyoutTarget9);
}

private void OnFlyoutTarget10Click(object sender, RoutedEventArgs e)
{
ShowFlyoutAt(Flyout10, FlyoutTarget10);
}

private void ShowFlyoutAt(FlyoutBase flyout, FrameworkElement targetElement, FlyoutShowMode showMode = FlyoutShowMode.Transient)
{
if (PlatformConfiguration.IsOsVersionGreaterThanOrEqual(OSVersion.Redstone5))
Expand Down
Loading