[WIP] Non-functional now playing flyout sample
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
@@ -123,9 +123,6 @@
|
||||
<Compile Include="Shell.xaml.cs">
|
||||
<DependentUpon>Shell.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WindowContent.xaml.cs">
|
||||
<DependentUpon>WindowContent.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
@@ -133,7 +130,10 @@
|
||||
</AppxManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\album.jpg" />
|
||||
<Content Include="Assets\notification-icon-light.png" />
|
||||
<Content Include="Assets\Notification-Icon-Playing-Light.png" />
|
||||
<Content Include="Assets\Notification-Icon-Playing.png" />
|
||||
<Content Include="Assets\notification-icon.png" />
|
||||
<Content Include="Properties\Default.rd.xml" />
|
||||
<Content Include="Assets\LockScreenLogo.scale-200.png" />
|
||||
@@ -166,10 +166,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="WindowContent.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls.csproj">
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:TheXamlGuy.NotificationFlyout.Uwp.UI.Controls"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||||
IconSource="/Assets/notification-icon.png"
|
||||
LightIconSource="/Assets/notification-icon-light.png">
|
||||
IconSource="/Assets/Notification-Icon-Playing.png"
|
||||
LightIconSource="/Assets/Notification-Icon-Playing-Light.png">
|
||||
<controls:NotificationFlyout.FlyoutPresenterStyle>
|
||||
<Style TargetType="controls:NotificationFlyoutPresenter">
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
@@ -13,84 +12,59 @@
|
||||
</controls:NotificationFlyout.FlyoutPresenterStyle>
|
||||
<controls:NotificationFlyout.ContextMenu>
|
||||
<controls:NotificationFlyoutContextMenu>
|
||||
<MenuFlyoutItem Click="MenuFlyoutItem_Click" Text="Close" />
|
||||
<MenuFlyoutItem Text="Close" />
|
||||
</controls:NotificationFlyoutContextMenu>
|
||||
</controls:NotificationFlyout.ContextMenu>
|
||||
<StackPanel Margin="24">
|
||||
<ComboBox
|
||||
x:Name="Theme"
|
||||
Margin="0,0,0,8"
|
||||
SelectionChanged="Theme_SelectionChanged">
|
||||
<ComboBoxItem Content="Default" />
|
||||
<ComboBoxItem Content="Dark" />
|
||||
<ComboBoxItem Content="Light" />
|
||||
</ComboBox>
|
||||
<muxc:MenuBar>
|
||||
<muxc:MenuBarItem Title="File">
|
||||
<MenuFlyoutItem Text="New" />
|
||||
<MenuFlyoutItem Text="Open..." />
|
||||
<MenuFlyoutItem Text="Save" />
|
||||
<MenuFlyoutItem Text="Exit" />
|
||||
</muxc:MenuBarItem>
|
||||
|
||||
<muxc:MenuBarItem Title="Edit">
|
||||
<MenuFlyoutItem Text="Undo" />
|
||||
<MenuFlyoutItem Text="Cut" />
|
||||
<MenuFlyoutItem Text="Copy" />
|
||||
<MenuFlyoutItem Text="Paste" />
|
||||
</muxc:MenuBarItem>
|
||||
|
||||
<muxc:MenuBarItem Title="Help">
|
||||
<MenuFlyoutItem Text="About" />
|
||||
</muxc:MenuBarItem>
|
||||
</muxc:MenuBar>
|
||||
<muxc:ProgressRing Margin="0,0,0,8" IsActive="True" />
|
||||
<muxc:ProgressBar
|
||||
Width="130"
|
||||
Margin="0,0,0,8"
|
||||
IsIndeterminate="True"
|
||||
ShowError="False"
|
||||
ShowPaused="False" />
|
||||
<Button
|
||||
Margin="0,0,0,8"
|
||||
Click="Button_Click"
|
||||
Content="Open window" />
|
||||
<Slider Margin="0,0,0,8" />
|
||||
<TextBox Margin="0,0,0,8" />
|
||||
<CalendarView Margin="0,0,0,8" />
|
||||
<TimePicker x:Name="foo" Margin="0,0,0,8" />
|
||||
<DatePicker />
|
||||
<muxc:NumberBox
|
||||
x:Name="NumberBoxSpinButtonPlacementExample"
|
||||
Header="Enter an integer:"
|
||||
LargeChange="100"
|
||||
SmallChange="10"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Value="1" />
|
||||
<muxc:RadioButtons Header="Options:">
|
||||
<RadioButton Content="Option 1" />
|
||||
<RadioButton Content="Option 2" />
|
||||
<RadioButton Content="Option 3" />
|
||||
</muxc:RadioButtons>
|
||||
<StackPanel>
|
||||
<CheckBox
|
||||
x:Name="OptionsAllCheckBox"
|
||||
Content="Select all"
|
||||
IsThreeState="True" />
|
||||
<CheckBox
|
||||
x:Name="Option1CheckBox"
|
||||
Margin="24,0,0,0"
|
||||
Content="Option 1" />
|
||||
<CheckBox
|
||||
x:Name="Option2CheckBox"
|
||||
Margin="24,0,0,0"
|
||||
Content="Option 2"
|
||||
IsChecked="True" />
|
||||
<CheckBox
|
||||
x:Name="Option3CheckBox"
|
||||
Margin="24,0,0,0"
|
||||
Content="Option 3" />
|
||||
</StackPanel>
|
||||
<muxc:RatingControl AutomationProperties.Name="RatingControl with placeholder" PlaceholderValue="0" />
|
||||
</StackPanel>
|
||||
<Grid Width="400" Margin="24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Margin="0,0,0,4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Width="94"
|
||||
Height="94"
|
||||
Background="Gray"
|
||||
CornerRadius="4">
|
||||
<Image Source="/Assets/album.jpg" Stretch="UniformToFill" />
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" Margin="12,12,0,0">
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="Foo Fighters" />
|
||||
<TextBlock Text="Best of you" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Slider Grid.Row="1" />
|
||||
<Grid Grid.Row="2">
|
||||
<TextBlock HorizontalAlignment="Left" Text="00:00" />
|
||||
<TextBlock HorizontalAlignment="Right" Text="04:16" />
|
||||
</Grid>
|
||||
<CommandBar
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Transparent"
|
||||
DefaultLabelPosition="Collapsed">
|
||||
<AppBarButton Width="48" CornerRadius="4">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarButton Width="48" CornerRadius="4">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
<AppBarButton Width="48" CornerRadius="4">
|
||||
<AppBarButton.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</AppBarButton.Icon>
|
||||
</AppBarButton>
|
||||
</CommandBar>
|
||||
</Grid>
|
||||
</controls:NotificationFlyout>
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace NotificationFlyoutSample
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Media.Control;
|
||||
|
||||
namespace NotificationFlyoutSample
|
||||
{
|
||||
public sealed partial class Shell
|
||||
{
|
||||
@@ -7,23 +11,6 @@
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
private void MenuFlyoutItem_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
@@ -31,10 +18,17 @@
|
||||
app.Exit();
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
private async void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
var app = GetApplication();
|
||||
app.OpenAsWindow<WindowContent>();
|
||||
//var gsmtcsm = await GetSystemMediaTransportControlsSessionManager();
|
||||
//var mediaProperties = await GetMediaProperties(gsmtcsm.GetCurrentSession());
|
||||
|
||||
}
|
||||
|
||||
//private static async Task<GlobalSystemMediaTransportControlsSessionManager> GetSystemMediaTransportControlsSessionManager() =>
|
||||
//await GlobalSystemMediaTransportControlsSessionManager.RequestAsync();
|
||||
|
||||
//private static async Task<GlobalSystemMediaTransportControlsSessionMediaProperties> GetMediaProperties(GlobalSystemMediaTransportControlsSession session) =>
|
||||
// await session.TryGetMediaPropertiesAsync();
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="NotificationFlyoutSample.WindowContent"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls">
|
||||
<muxc:NavigationView x:Name="nvSample">
|
||||
<muxc:NavigationView.MenuItems>
|
||||
<muxc:NavigationViewItem
|
||||
Content="Menu Item1"
|
||||
Icon="Play"
|
||||
Tag="SamplePage1" />
|
||||
<muxc:NavigationViewItem
|
||||
Content="Menu Item2"
|
||||
Icon="Save"
|
||||
Tag="SamplePage2" />
|
||||
<muxc:NavigationViewItem
|
||||
Content="Menu Item3"
|
||||
Icon="Refresh"
|
||||
Tag="SamplePage3" />
|
||||
<muxc:NavigationViewItem
|
||||
Content="Menu Item4"
|
||||
Icon="Download"
|
||||
Tag="SamplePage4" />
|
||||
</muxc:NavigationView.MenuItems>
|
||||
<Frame x:Name="contentFrame" />
|
||||
</muxc:NavigationView>
|
||||
</UserControl>
|
||||
@@ -1,14 +0,0 @@
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
|
||||
namespace NotificationFlyoutSample
|
||||
{
|
||||
public sealed partial class WindowContent : UserControl
|
||||
{
|
||||
public WindowContent()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user