This commit is contained in:
Daniel Clark
2021-02-08 01:13:24 +00:00
parent 72941706d9
commit 1f9e90c8fe
12 changed files with 283 additions and 53 deletions
@@ -2,13 +2,15 @@
x:Class="NotificationFlyout.Sample.NotificationFlyoutPresenter"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:NotificationFlyout.Uwp.UI.Controls"
CornerRadius="4"
RequestedTheme="Default">
xmlns:controls="using:NotificationFlyout.Uwp.UI.Controls">
<Grid
Width="330"
Height="360"
Margin="23">
<ToggleSwitch x:Name="test" Toggled="ToggleSwitch_Toggled" />
Margin="24">
<ComboBox x:Name="test" Margin="0,0,0,8" SelectionChanged="test_SelectionChanged">
<ComboBoxItem>System</ComboBoxItem>
<ComboBoxItem>Dark</ComboBoxItem>
<ComboBoxItem>Light</ComboBoxItem>
</ComboBox>
</Grid>
</controls:NotificationFlyoutPresenter>
@@ -7,13 +7,21 @@
InitializeComponent();
}
private void ToggleSwitch_Toggled(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private void test_SelectionChanged(object sender, Windows.UI.Xaml.Controls.SelectionChangedEventArgs e)
{
if (test.IsOn)
if (test.SelectedIndex == 0)
{
this.RequestedTheme = Windows.UI.Xaml.ElementTheme.Default;
}
if (test.SelectedIndex == 1)
{
this.RequestedTheme = Windows.UI.Xaml.ElementTheme.Dark;
}
else
if (test.SelectedIndex == 2)
{
this.RequestedTheme = Windows.UI.Xaml.ElementTheme.Light;
@@ -14,7 +14,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// information for an assembly consists of the following four values:
//
// Major Version
// Minor Version