Skip to content

Commit

Permalink
fix(ToggleMenuFlyoutItem): added DefaultStyleKey so that the correct …
Browse files Browse the repository at this point in the history
…style is used
  • Loading branch information
LHuss committed Aug 19, 2020
1 parent 691a671 commit 4994148
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/SamplesApp/UITests.Shared/UITests.Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\Flyout\Flyout_ToggleMenu.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\Flyout\Flyout_Unloaded.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -3833,6 +3837,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\Flyout\Flyout_TemplatedParent.xaml.cs">
<DependentUpon>Flyout_TemplatedParent.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\Flyout\Flyout_ToggleMenu.xaml.cs">
<DependentUpon>Flyout_ToggleMenu.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\Flyout\Flyout_Unloaded.xaml.cs">
<DependentUpon>Flyout_Unloaded.xaml</DependentUpon>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Page
x:Class="UITests.Shared.Windows_UI_Xaml_Controls.Flyout.Flyout_ToggleMenu"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UITests.Windows_UI_Xaml_Controls.Flyout"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
d:DesignHeight="300"
d:DesignWidth="400">

<StackPanel Orientation="Horizontal" Grid.Row="1">
<AppBarButton Icon="Clock" Label="Test">
<AppBarButton.Flyout>
<MenuFlyout x:Name="uiMenuDelay">
<ToggleMenuFlyoutItem x:Name="test1" Text="test 1"/>
<ToggleMenuFlyoutItem x:Name="test2" Text="test 2" IsChecked="True"/>
<ToggleMenuFlyoutItem x:Name="test3" Text="test 3"/>
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
</StackPanel>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Uno.UI.Samples.Controls;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236

namespace UITests.Shared.Windows_UI_Xaml_Controls.Flyout
{
[SampleControlInfo("Flyout", "Flyout_ToggleMenu")]
public sealed partial class Flyout_ToggleMenu : Page
{
public Flyout_ToggleMenu()
{
this.InitializeComponent();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public partial class ToggleMenuFlyoutItem : MenuFlyoutItem
{
public ToggleMenuFlyoutItem()
{
DefaultStyleKey = typeof(ToggleMenuFlyoutItem);
}

#region IsChecked
Expand Down

0 comments on commit 4994148

Please sign in to comment.