Move *everything* from setting flyout content and the flyout icons to a UWP control and simplified creation of the wpf host via a NotificationFlyoutApplication where you only need to set the UWP flyout
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -130,6 +130,8 @@
|
||||
</AppxManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\Icon-Light.ico" />
|
||||
<Content Include="Assets\Icon.ico" />
|
||||
<Content Include="Properties\Default.rd.xml" />
|
||||
<Content Include="Assets\LockScreenLogo.scale-200.png" />
|
||||
<Content Include="Assets\SplashScreen.scale-200.png" />
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
<UserControl
|
||||
<controls:NotificationFlyout
|
||||
x:Class="NotificationFlyoutSample.Shell"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:winui="using:Microsoft.UI.Xaml.Controls">
|
||||
<StackPanel
|
||||
Width="330"
|
||||
Height="500"
|
||||
Margin="24">
|
||||
<ComboBox x:Name="Theme" SelectionChanged="Theme_SelectionChanged">
|
||||
<ComboBoxItem Content="Default" />
|
||||
<ComboBoxItem Content="Dark" />
|
||||
<ComboBoxItem Content="Light" />
|
||||
</ComboBox>
|
||||
<Button Margin="0,0,0,8" Content="Button" />
|
||||
<Slider Margin="0,0,0,8" />
|
||||
<TextBox Margin="0,0,0,8" />
|
||||
<ToggleButton Margin="0,0,0,8" />
|
||||
<CalendarView Margin="0,0,0,8" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
xmlns:controls="using:NotificationFlyout.Uwp.UI.Controls"
|
||||
xmlns:winui="using:Microsoft.UI.Xaml.Controls"
|
||||
LightIconSource="/Assets/Icon.ico">
|
||||
<controls:NotificationFlyout.Content>
|
||||
<StackPanel
|
||||
Width="330"
|
||||
Height="500"
|
||||
Margin="24">
|
||||
<ComboBox x:Name="Theme" SelectionChanged="Theme_SelectionChanged">
|
||||
<ComboBoxItem Content="Default" />
|
||||
<ComboBoxItem Content="Dark" />
|
||||
<ComboBoxItem Content="Light" />
|
||||
</ComboBox>
|
||||
<Button Margin="0,0,0,8" Content="Button" />
|
||||
<Slider Margin="0,0,0,8" />
|
||||
<TextBox Margin="0,0,0,8" />
|
||||
<ToggleButton Margin="0,0,0,8" />
|
||||
<CalendarView Margin="0,0,0,8" />
|
||||
</StackPanel>
|
||||
</controls:NotificationFlyout.Content>
|
||||
</controls:NotificationFlyout>
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
|
||||
private void Theme_SelectionChanged(object sender, Windows.UI.Xaml.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
switch (Theme.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
RequestedTheme = Windows.UI.Xaml.ElementTheme.Default;
|
||||
break;
|
||||
case 1:
|
||||
RequestedTheme = Windows.UI.Xaml.ElementTheme.Dark;
|
||||
break;
|
||||
case 2:
|
||||
RequestedTheme = Windows.UI.Xaml.ElementTheme.Light;
|
||||
break;
|
||||
}
|
||||
//switch (Theme.SelectedIndex)
|
||||
//{
|
||||
// case 0:
|
||||
// RequestedTheme = Windows.UI.Xaml.ElementTheme.Default;
|
||||
// break;
|
||||
// case 1:
|
||||
// RequestedTheme = Windows.UI.Xaml.ElementTheme.Dark;
|
||||
// break;
|
||||
// case 2:
|
||||
// RequestedTheme = Windows.UI.Xaml.ElementTheme.Light;
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user