Wrote some black magic due to this bug https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/issues/228
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user