Introduced a NotificationFlyoutPresenter to allow you to restyle/retemplate the flyout from within your UWP app
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
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 NotificationFlyout.Sample
|
||||
{
|
||||
public sealed partial class MyUserControl1 : UserControl
|
||||
{
|
||||
public MyUserControl1()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,8 +120,8 @@
|
||||
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MyUserControl1.xaml.cs">
|
||||
<DependentUpon>MyUserControl1.xaml</DependentUpon>
|
||||
<Compile Include="NotificationFlyoutPresenter.xaml.cs">
|
||||
<DependentUpon>NotificationFlyoutPresenter.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\NotificationFlyout.Sample.rd.xml" />
|
||||
@@ -135,11 +135,17 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="MyUserControl1.xaml">
|
||||
<Page Include="NotificationFlyoutPresenter.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NotificationFlyout.Uwp.UI.Controls\NotificationFlyout.Uwp.UI.Controls.csproj">
|
||||
<Project>{9987b132-e42c-401a-9ad5-e62529faca40}</Project>
|
||||
<Name>NotificationFlyout.Uwp.UI.Controls</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
+6
-4
@@ -1,7 +1,9 @@
|
||||
<UserControl
|
||||
x:Class="NotificationFlyout.Sample.MyUserControl1"
|
||||
<controls:NotificationFlyoutPresenter
|
||||
x:Class="NotificationFlyout.Sample.NotificationFlyoutPresenter"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:NotificationFlyout.Uwp.UI.Controls"
|
||||
CornerRadius="4">
|
||||
<Grid>
|
||||
<ListBox
|
||||
Width="300"
|
||||
@@ -15,4 +17,4 @@
|
||||
<ListBoxItem Content="Item 6" />
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</controls:NotificationFlyoutPresenter>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace NotificationFlyout.Sample
|
||||
{
|
||||
public sealed partial class NotificationFlyoutPresenter
|
||||
{
|
||||
public NotificationFlyoutPresenter()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user