It's no or never... remap Namespaces with TheXamlGuy.* prefix

This commit is contained in:
Daniel Clark
2021-02-14 15:31:07 +00:00
parent 2d74e40948
commit 8dce9f882b
24 changed files with 130 additions and 742 deletions
@@ -3,4 +3,4 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources />
</Application>
</Application>
@@ -1,4 +1,10 @@
using System.Windows;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace NotificationFlyoutSample.Host
{
@@ -8,4 +14,4 @@ namespace NotificationFlyoutSample.Host
public partial class App : Application
{
}
}
}
@@ -7,4 +7,4 @@ using System.Windows;
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
)]
@@ -1,15 +1,11 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<Platforms>x64</Platforms>
<AssetTargetFallback>uap10.0.19041</AssetTargetFallback>
<Platforms>AnyCPU;x64</Platforms>
<StartupObject>NotificationFlyoutSample.Host.Program</StartupObject>
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
<EnableXBindDiagnostics>false</EnableXBindDiagnostics>
<MSBuildWarningsAsMessages>NU1702</MSBuildWarningsAsMessages>
</PropertyGroup>
<ItemGroup>
@@ -17,8 +13,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\NotificationFlyout.Wpf.UI.Controls\NotificationFlyout.Wpf.UI.Controls.csproj" />
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls.csproj" />
<ProjectReference Include="..\NotificationFlyoutSample\NotificationFlyoutSample.csproj" />
</ItemGroup>
</Project>
</Project>
@@ -1,5 +1,5 @@
using NotificationFlyout.Wpf.UI.Controls;
using System;
using System;
using TheXamlGuy.NotificationFlyout.Wpf.UI.Controls;
namespace NotificationFlyoutSample.Host
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

@@ -1,83 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
</PropertyGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>e2f52d15-a3bb-41ce-901c-ab491c50327a</ProjectGuid>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<EntryPointProjectUniqueName>..\NotificationFlyoutSample.Host\NotificationFlyoutSample.Host.csproj</EntryPointProjectUniqueName>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\LockScreenLogo.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Images\StoreLogo.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.19041.8" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NotificationFlyoutSample.Host\NotificationFlyoutSample.Host.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
</Project>
@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity
Name="b15dd450-41a7-49e9-bc4f-8192a7063ae2"
Publisher="CN=dan"
Version="1.0.0.0" />
<Properties>
<DisplayName>NotificationFlyoutSample.Package</DisplayName>
<PublisherDisplayName>dan</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="NotificationFlyoutSample.Package"
Description="NotificationFlyoutSample.Package"
BackgroundColor="transparent"
Square150x150Logo="Images\Square150x150Logo.png"
Square44x44Logo="Images\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" />
<uap:SplashScreen Image="Images\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
+106 -106
View File
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30914.41
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationFlyoutSample.Host", "NotificationFlyoutSample.Host\NotificationFlyoutSample.Host.csproj", "{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationFlyoutSample", "NotificationFlyoutSample\NotificationFlyoutSample.csproj", "{2057ADE0-C61E-45EE-BB7E-A469FE4D4C41}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1E895953-2231-4ACA-84A6-64F8F57FE86A}"
@@ -12,13 +10,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationFlyout.Shared.UI", "..\src\NotificationFlyout.Shared.UI\NotificationFlyout.Shared.UI.csproj", "{5A47C726-FA50-4A16-B639-DEC79B9D365B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Shared.UI", "..\src\TheXamlGuy.NotificationFlyout.Shared.UI\TheXamlGuy.NotificationFlyout.Shared.UI.csproj", "{DF0630F3-5571-46C5-8D1D-39079BFCEC74}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationFlyout.Uwp.UI.Controls", "..\src\NotificationFlyout.Uwp.UI.Controls\NotificationFlyout.Uwp.UI.Controls.csproj", "{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Uwp.UI.Controls", "..\src\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls.csproj", "{8501316D-F994-4A29-9EC4-DC6C6B93F565}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationFlyout.Wpf.UI", "..\src\NotificationFlyout.Wpf.UI\NotificationFlyout.Wpf.UI.csproj", "{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Wpf.UI", "..\src\TheXamlGuy.NotificationFlyout.Wpf.UI\TheXamlGuy.NotificationFlyout.Wpf.UI.csproj", "{6501E7B8-2DC1-4971-9AD5-76945F48E773}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationFlyout.Wpf.UI.Controls", "..\src\NotificationFlyout.Wpf.UI.Controls\NotificationFlyout.Wpf.UI.Controls.csproj", "{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Wpf.UI.Controls", "..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls.csproj", "{0310655E-5620-4B6B-81E5-8155EB04C2A6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationFlyoutSample.Host", "NotificationFlyoutSample.Host\NotificationFlyoutSample.Host.csproj", "{591F26F7-C057-434A-B612-AEB37B1234AE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -34,26 +34,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|Any CPU.ActiveCfg = Debug|x64
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|Any CPU.Build.0 = Debug|x64
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|ARM.Build.0 = Debug|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|ARM64.Build.0 = Debug|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|x64.ActiveCfg = Debug|x64
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|x64.Build.0 = Debug|x64
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|x86.ActiveCfg = Debug|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Debug|x86.Build.0 = Debug|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|Any CPU.Build.0 = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|ARM.ActiveCfg = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|ARM.Build.0 = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|ARM64.ActiveCfg = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|ARM64.Build.0 = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|x64.ActiveCfg = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|x64.Build.0 = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|x86.ActiveCfg = Release|Any CPU
{D13742AD-DB71-4269-B3AF-7CA8C4E51A19}.Release|x86.Build.0 = Release|Any CPU
{2057ADE0-C61E-45EE-BB7E-A469FE4D4C41}.Debug|Any CPU.ActiveCfg = Debug|x64
{2057ADE0-C61E-45EE-BB7E-A469FE4D4C41}.Debug|Any CPU.Build.0 = Debug|x64
{2057ADE0-C61E-45EE-BB7E-A469FE4D4C41}.Debug|ARM.ActiveCfg = Debug|ARM
@@ -81,86 +61,106 @@ Global
{2057ADE0-C61E-45EE-BB7E-A469FE4D4C41}.Release|x86.ActiveCfg = Release|x86
{2057ADE0-C61E-45EE-BB7E-A469FE4D4C41}.Release|x86.Build.0 = Release|x86
{2057ADE0-C61E-45EE-BB7E-A469FE4D4C41}.Release|x86.Deploy.0 = Release|x86
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|ARM.ActiveCfg = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|ARM.Build.0 = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|ARM64.Build.0 = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|x64.ActiveCfg = Debug|x64
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|x64.Build.0 = Debug|x64
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|x86.ActiveCfg = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Debug|x86.Build.0 = Debug|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|Any CPU.Build.0 = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|ARM.ActiveCfg = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|ARM.Build.0 = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|ARM64.ActiveCfg = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|ARM64.Build.0 = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|x64.ActiveCfg = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|x64.Build.0 = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|x86.ActiveCfg = Release|Any CPU
{5A47C726-FA50-4A16-B639-DEC79B9D365B}.Release|x86.Build.0 = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|Any CPU.Build.0 = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|ARM.ActiveCfg = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|ARM.Build.0 = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|ARM64.Build.0 = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|x64.ActiveCfg = Debug|x64
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|x64.Build.0 = Debug|x64
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|x86.ActiveCfg = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Debug|x86.Build.0 = Debug|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|Any CPU.ActiveCfg = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|Any CPU.Build.0 = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|ARM.ActiveCfg = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|ARM.Build.0 = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|ARM64.ActiveCfg = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|ARM64.Build.0 = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|x64.ActiveCfg = Release|x64
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|x64.Build.0 = Release|x64
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|x86.ActiveCfg = Release|Any CPU
{197A7AC8-6F6B-48D4-A95B-9AE9E2008817}.Release|x86.Build.0 = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|ARM.ActiveCfg = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|ARM.Build.0 = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|ARM64.Build.0 = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|x64.ActiveCfg = Debug|x64
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|x64.Build.0 = Debug|x64
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|x86.ActiveCfg = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Debug|x86.Build.0 = Debug|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|Any CPU.Build.0 = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|ARM.ActiveCfg = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|ARM.Build.0 = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|ARM64.ActiveCfg = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|ARM64.Build.0 = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|x64.ActiveCfg = Release|x64
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|x64.Build.0 = Release|x64
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|x86.ActiveCfg = Release|Any CPU
{3222D603-00E9-4C00-BDA3-B2F33AFDE4BB}.Release|x86.Build.0 = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|ARM.ActiveCfg = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|ARM.Build.0 = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|ARM64.Build.0 = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|x64.ActiveCfg = Debug|x64
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|x64.Build.0 = Debug|x64
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|x86.ActiveCfg = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Debug|x86.Build.0 = Debug|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|Any CPU.Build.0 = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|ARM.ActiveCfg = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|ARM.Build.0 = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|ARM64.ActiveCfg = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|ARM64.Build.0 = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|x64.ActiveCfg = Release|x64
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|x64.Build.0 = Release|x64
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|x86.ActiveCfg = Release|Any CPU
{DEEF73AF-26B6-46BE-B824-0FDF0EE671F3}.Release|x86.Build.0 = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|Any CPU.ActiveCfg = Debug|x64
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|Any CPU.Build.0 = Debug|x64
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|ARM.ActiveCfg = Debug|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|ARM.Build.0 = Debug|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|ARM64.Build.0 = Debug|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|x64.ActiveCfg = Debug|x64
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|x64.Build.0 = Debug|x64
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|x86.ActiveCfg = Debug|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Debug|x86.Build.0 = Debug|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|Any CPU.Build.0 = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|ARM.ActiveCfg = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|ARM.Build.0 = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|ARM64.ActiveCfg = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|ARM64.Build.0 = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|x64.ActiveCfg = Release|x64
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|x64.Build.0 = Release|x64
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|x86.ActiveCfg = Release|Any CPU
{DF0630F3-5571-46C5-8D1D-39079BFCEC74}.Release|x86.Build.0 = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|Any CPU.ActiveCfg = Debug|x64
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|Any CPU.Build.0 = Debug|x64
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|ARM.Build.0 = Debug|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|ARM64.Build.0 = Debug|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|x64.ActiveCfg = Debug|x64
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|x64.Build.0 = Debug|x64
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|x86.ActiveCfg = Debug|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Debug|x86.Build.0 = Debug|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|Any CPU.Build.0 = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|ARM.ActiveCfg = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|ARM.Build.0 = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|ARM64.ActiveCfg = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|ARM64.Build.0 = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|x64.ActiveCfg = Release|x64
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|x64.Build.0 = Release|x64
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|x86.ActiveCfg = Release|Any CPU
{8501316D-F994-4A29-9EC4-DC6C6B93F565}.Release|x86.Build.0 = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|Any CPU.ActiveCfg = Debug|x64
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|Any CPU.Build.0 = Debug|x64
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|ARM.Build.0 = Debug|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|ARM64.Build.0 = Debug|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|x64.ActiveCfg = Debug|x64
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|x64.Build.0 = Debug|x64
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|x86.ActiveCfg = Debug|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Debug|x86.Build.0 = Debug|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|Any CPU.Build.0 = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|ARM.ActiveCfg = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|ARM.Build.0 = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|ARM64.ActiveCfg = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|ARM64.Build.0 = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|x64.ActiveCfg = Release|x64
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|x64.Build.0 = Release|x64
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|x86.ActiveCfg = Release|Any CPU
{6501E7B8-2DC1-4971-9AD5-76945F48E773}.Release|x86.Build.0 = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|Any CPU.ActiveCfg = Debug|x64
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|Any CPU.Build.0 = Debug|x64
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|ARM.Build.0 = Debug|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|ARM64.Build.0 = Debug|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|x64.ActiveCfg = Debug|x64
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|x64.Build.0 = Debug|x64
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|x86.ActiveCfg = Debug|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Debug|x86.Build.0 = Debug|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|Any CPU.Build.0 = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|ARM.ActiveCfg = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|ARM.Build.0 = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|ARM64.ActiveCfg = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|ARM64.Build.0 = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|x64.ActiveCfg = Release|x64
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|x64.Build.0 = Release|x64
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|x86.ActiveCfg = Release|Any CPU
{0310655E-5620-4B6B-81E5-8155EB04C2A6}.Release|x86.Build.0 = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|Any CPU.ActiveCfg = Debug|x64
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|Any CPU.Build.0 = Debug|x64
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|ARM.ActiveCfg = Debug|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|ARM.Build.0 = Debug|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|ARM64.Build.0 = Debug|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|x64.ActiveCfg = Debug|x64
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|x64.Build.0 = Debug|x64
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|x86.ActiveCfg = Debug|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Debug|x86.Build.0 = Debug|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|Any CPU.Build.0 = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|ARM.ActiveCfg = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|ARM.Build.0 = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|ARM64.ActiveCfg = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|ARM64.Build.0 = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|x64.ActiveCfg = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|x64.Build.0 = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|x86.ActiveCfg = Release|Any CPU
{591F26F7-C057-434A-B612-AEB37B1234AE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -172,13 +172,13 @@
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\NotificationFlyout.Uwp.UI.Controls\NotificationFlyout.Uwp.UI.Controls.csproj">
<Project>{197a7ac8-6f6b-48d4-a95b-9ae9e2008817}</Project>
<Name>NotificationFlyout.Uwp.UI.Controls</Name>
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Shared.UI\TheXamlGuy.NotificationFlyout.Shared.UI.csproj">
<Project>{7d6a151b-c021-4d34-adc1-0171a2f65a00}</Project>
<Name>TheXamlGuy.NotificationFlyout.Shared.UI</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\NotificationFlyout.Shared.UI\NotificationFlyout.Shared.UI.csproj">
<Project>{197a7ac8-6f6b-48d4-a95b-9ae9e2008817}</Project>
<Name>NotificationFlyout.Shared.UI</Name>
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls.csproj">
<Project>{8501316d-f994-4a29-9ec4-dc6c6b93f565}</Project>
<Name>TheXamlGuy.NotificationFlyout.Uwp.UI.Controls</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
+1 -1
View File
@@ -2,7 +2,7 @@
x:Class="NotificationFlyoutSample.Shell"
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"
xmlns:controls="using:TheXamlGuy.NotificationFlyout.Uwp.UI.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
IconSource="/Assets/Icon.ico"
LightIconSource="/Assets/Icon-Light.ico">
@@ -1,100 +0,0 @@
using System.Collections.Specialized;
using System.Linq;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
namespace NotificationFlyout.Uwp.UI.Controls
{
internal class NotificationFlyoutContextMenuFlyoutHost : Control
{
private NotificationFlyout _flyout;
private MenuFlyout _menuFlyout;
private Grid _root;
public NotificationFlyoutContextMenuFlyoutHost() => DefaultStyleKey = typeof(NotificationFlyoutContextMenuFlyoutHost);
public void HideFlyout()
{
if (_menuFlyout == null) return;
_menuFlyout.Hide();
}
public void ShowFlyout()
{
if (_root == null) return;
if (_menuFlyout == null) return;
_menuFlyout.ShowAt(_root, new FlyoutShowOptions
{
Placement = FlyoutPlacementMode.BottomEdgeAlignedLeft,
ShowMode = FlyoutShowMode.TransientWithDismissOnPointerMoveAway
});
}
internal void SetOwningFlyout(NotificationFlyout flyout)
{
if (_flyout != null)
{
(_flyout.ContextMenu.MenuItems as INotifyCollectionChanged).CollectionChanged -= OnContextMenuItemsChanged;
}
_flyout = flyout;
var contextMenu = _flyout.ContextMenu;
if (contextMenu == null) return;
(contextMenu.MenuItems as INotifyCollectionChanged).CollectionChanged += OnContextMenuItemsChanged;
PrepareMenuItems();
}
protected override void OnApplyTemplate()
{
_root = GetTemplateChild("Root") as Grid;
_menuFlyout = GetTemplateChild("Flyout") as MenuFlyout;
PrepareMenuItems();
}
private void OnContextMenuItemsChanged(object sender, NotifyCollectionChangedEventArgs args)
{
if (_flyout == null) return;
var contextMenu = _flyout.ContextMenu;
if (contextMenu == null) return;
var addedItems = args.NewItems.Cast<MenuFlyoutItemBase>().ToList();
var removedItems = args.NewItems.Cast<MenuFlyoutItemBase>().ToList();
if (removedItems != null)
{
foreach (var item in removedItems)
{
_menuFlyout.Items.Remove(item);
}
}
foreach (var item in addedItems)
{
_menuFlyout.Items.Add(item);
}
}
private void PrepareMenuItems()
{
if (_menuFlyout == null) return;
if (_flyout == null) return;
var contextMenu = _flyout.ContextMenu;
if (contextMenu == null) return;
_menuFlyout.Items.Clear();
var items = contextMenu.MenuItems;
foreach (var item in items)
{
_menuFlyout.Items.Add(item);
}
}
}
}
@@ -1,18 +0,0 @@
<ResourceDictionary
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">
<Style TargetType="controls:NotificationFlyoutContextMenuFlyoutHost">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:NotificationFlyoutContextMenuFlyoutHost">
<Grid x:Name="Root">
<FlyoutBase.AttachedFlyout>
<MenuFlyout x:Name="Flyout" />
</FlyoutBase.AttachedFlyout>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
@@ -1,148 +0,0 @@
using System.Numerics;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;
namespace NotificationFlyout.Uwp.UI.Controls
{
internal class NotificationFlyoutHost : Control
{
public static readonly DependencyProperty ContentProperty =
DependencyProperty.Register(nameof(Content),
typeof(UIElement), typeof(NotificationFlyoutHost),
new PropertyMetadata(null));
public static readonly DependencyProperty FlyoutPresenterStyleProperty =
DependencyProperty.Register(nameof(FlyoutPresenterStyle),
typeof(Style), typeof(NotificationFlyoutHost),
new PropertyMetadata(null));
private Flyout _flyout;
private bool _isLoaded;
private NotificationFlyout _notificationFlyout;
private string _placement;
private Grid _root;
public NotificationFlyoutHost() => DefaultStyleKey = typeof(NotificationFlyoutHost);
public UIElement Content
{
get => (UIElement)GetValue(ContentProperty);
set => SetValue(ContentProperty, value);
}
public Style FlyoutPresenterStyle
{
get => (Style)GetValue(FlyoutPresenterStyleProperty);
set => SetValue(FlyoutPresenterStyleProperty, value);
}
public void HideFlyout()
{
if (_root == null) return;
FlyoutBase flyout = FlyoutBase.GetAttachedFlyout(_root);
flyout.Hide();
}
internal void UpdateThemeVisualState()
{
}
public void SetFlyoutPlacement(string placement)
{
if (!_isLoaded)
{
_placement = placement;
}
if (string.IsNullOrEmpty(placement)) return;
VisualStateManager.GoToState(this, placement, true);
}
public void ShowFlyout(FlyoutPlacementMode placementMode)
{
if (_root == null) return;
var flyout = FlyoutBase.GetAttachedFlyout(_root);
flyout.ShowAt(_root, new FlyoutShowOptions
{
Placement = placementMode,
ShowMode = FlyoutShowMode.Transient,
});
}
internal void SetOwningFlyout(NotificationFlyout flyout)
{
_notificationFlyout = flyout;
BindingOperations.SetBinding(this, ContentProperty,
new Binding
{
Source = _notificationFlyout,
Path =
new PropertyPath(nameof(Content)),
Mode = BindingMode.TwoWay
});
BindingOperations.SetBinding(this, RequestedThemeProperty,
new Binding
{
Source = _notificationFlyout,
Path = new PropertyPath(nameof(RequestedTheme)),
Mode = BindingMode.TwoWay
});
BindingOperations.SetBinding(this, FlyoutPresenterStyleProperty,
new Binding
{
Source = _notificationFlyout,
Path = new PropertyPath(nameof(FlyoutPresenterStyle)),
Mode = BindingMode.TwoWay
});
}
private NotificationFlyoutPresenter _flyoutPresenter;
protected override void OnApplyTemplate()
{
_flyoutPresenter = GetTemplateChild("FlyoutPresenter") as NotificationFlyoutPresenter;
_flyout = GetTemplateChild("Flyout") as Flyout;
if (_flyout != null)
{
_flyout.Closing -= OnFlyoutClosing;
_flyout.Closed -= OnFlyoutClosed;
_flyout.Opening -= OnFlyoutOpening;
_flyout.Opened -= OnFlyoutOpened;
_flyout.Closing += OnFlyoutClosing;
_flyout.Closed += OnFlyoutClosed;
_flyout.Opening += OnFlyoutOpening;
_flyout.Opened += OnFlyoutOpened;
}
_root = GetTemplateChild("Root") as Grid;
if (GetTemplateChild("ContentRoot") is Grid contentRoot)
{
contentRoot.Shadow = new ThemeShadow();
var currentTranslation = contentRoot.Translation;
var translation = new Vector3(currentTranslation.X, currentTranslation.Y, 16.0f);
contentRoot.Translation = translation;
}
_isLoaded = true;
SetFlyoutPlacement(_placement);
}
private void OnFlyoutClosed(object sender, object args) => _notificationFlyout?.InvokeClosedEvent(args);
private void OnFlyoutClosing(FlyoutBase sender, FlyoutBaseClosingEventArgs args) => _notificationFlyout?.InvokeClosingEvent(new NotificationFlyoutClosingEventArgs());
private void OnFlyoutOpened(object sender, object args) => _notificationFlyout?.InvokeOpenedEvent(args);
private void OnFlyoutOpening(object sender, object args) => _notificationFlyout?.InvokeOpeningEvent(args);
}
}
@@ -1,107 +0,0 @@
<ResourceDictionary
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">
<Style TargetType="controls:NotificationFlyoutHost">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:NotificationFlyoutHost">
<Grid x:Name="Root">
<Grid.Resources>
<Style x:Key="DefaultFlyoutPresenterStyle" TargetType="FlyoutPresenter">
<Setter Property="IsDefaultShadowEnabled" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="FlyoutPresenter">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="TopFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="0,-7,0,0" />
</Style>
<Style
x:Key="BottomFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="0,7,0,0" />
</Style>
<Style
x:Key="LeftFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="-7,0,0,0" />
</Style>
<Style
x:Key="RightFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="7,0,0,0" />
</Style>
</Grid.Resources>
<FlyoutBase.AttachedFlyout>
<Flyout
x:Name="Flyout"
AreOpenCloseAnimationsEnabled="False"
FlyoutPresenterStyle="{StaticResource BottomFlyoutPresenterStyle}"
ShouldConstrainToRootBounds="False">
<Grid x:Name="ContentRoot">
<Grid.Transitions>
<TransitionCollection>
<EntranceThemeTransition
x:Name="EntranceThemeTransition"
FromHorizontalOffset="0"
FromVerticalOffset="0" />
</TransitionCollection>
</Grid.Transitions>
<controls:NotificationFlyoutPresenter x:Name="FlyoutPresenter" Content="{TemplateBinding Content}" Style="{TemplateBinding FlyoutPresenterStyle}" />
</Grid>
</Flyout>
</FlyoutBase.AttachedFlyout>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="PlacementStates">
<VisualState x:Name="Bottom">
<VisualState.Setters>
<Setter Target="Flyout.FlyoutPresenterStyle" Value="{StaticResource BottomFlyoutPresenterStyle}" />
<Setter Target="EntranceThemeTransition.FromHorizontalOffset" Value="0" />
<Setter Target="EntranceThemeTransition.FromVerticalOffset" Value="80" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Top">
<VisualState.Setters>
<Setter Target="Flyout.FlyoutPresenterStyle" Value="{StaticResource TopFlyoutPresenterStyle}" />
<Setter Target="EntranceThemeTransition.FromHorizontalOffset" Value="0" />
<Setter Target="EntranceThemeTransition.FromVerticalOffset" Value="-80" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Left">
<VisualState.Setters>
<Setter Target="Flyout.FlyoutPresenterStyle" Value="{StaticResource LeftFlyoutPresenterStyle}" />
<Setter Target="EntranceThemeTransition.FromHorizontalOffset" Value="-80" />
<Setter Target="EntranceThemeTransition.FromVerticalOffset" Value="0" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Right">
<VisualState.Setters>
<Setter Target="Flyout.FlyoutPresenterStyle" Value="{StaticResource RightFlyoutPresenterStyle}" />
<Setter Target="EntranceThemeTransition.FromHorizontalOffset" Value="80" />
<Setter Target="EntranceThemeTransition.FromVerticalOffset" Value="0" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using Windows.UI.Xaml.Controls;
namespace NotificationFlyout.Uwp.UI.Controls
{
internal class NotificationFlyoutMenuItemsChangedEventArgs : EventArgs
{
public NotificationFlyoutMenuItemsChangedEventArgs(IList<MenuFlyoutItemBase> addedItems, IList<MenuFlyoutItemBase> removedItems)
{
AddedItems = addedItems;
RemovedItems = removedItems;
}
public IList<MenuFlyoutItemBase> AddedItems { get; private set; }
public IList<MenuFlyoutItemBase> RemovedItems { get; private set; }
}
}
@@ -1,9 +0,0 @@
using Windows.UI.Xaml.Controls;
namespace NotificationFlyout.Uwp.UI.Controls
{
public class NotificationFlyoutPresenter : ContentControl
{
public NotificationFlyoutPresenter() => DefaultStyleKey = typeof(NotificationFlyoutPresenter);
}
}
@@ -1,81 +0,0 @@
<ResourceDictionary
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">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<AcrylicBrush
x:Key="AcrylicBackgroundFillColorBrush"
BackgroundSource="HostBackdrop"
FallbackColor="#2C2C2C"
TintColor="#2C2C2C"
TintOpacity="0.8" />
<StaticResource x:Key="NotificationFlyoutPresenterBackgroundBrush" ResourceKey="AcrylicBackgroundFillColorBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<AcrylicBrush
x:Key="AcrylicBackgroundFillColorBrush"
BackgroundSource="HostBackdrop"
FallbackColor="#F9F9F9"
TintColor="#FCFCFC"
TintOpacity="0.8" />
<StaticResource x:Key="NotificationFlyoutPresenterBackgroundBrush" ResourceKey="AcrylicBackgroundFillColorBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<SolidColorBrush x:Key="NotificationFlyoutPresenterBackgroundBrush" Color="Green" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<AcrylicBrush
x:Key="NotificationFlyoutPresenterBackgroundAccentBrush"
BackgroundSource="HostBackdrop"
FallbackColor="{StaticResource SystemAccentColorDark1}"
TintColor="{StaticResource SystemAccentColorDark1}"
TintOpacity="0.8" />
<Style TargetType="controls:NotificationFlyoutPresenter">
<Setter Property="Background" Value="{ThemeResource NotificationFlyoutPresenterBackgroundBrush}" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:NotificationFlyoutPresenter">
<Border
x:Name="Root"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BackgroundSizing="OuterBorderEdge"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<ScrollViewer
x:Name="ScrollViewer"
AutomationProperties.AccessibilityView="Raw"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
<ContentControl
x:Name="ContentPresenter"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}" />
</ScrollViewer>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ThemeStates">
<VisualState x:Name="DefaultTheme" />
<VisualState x:Name="ColorPrevalenceTheme">
<VisualState.Setters>
<Setter Target="Root.Background" Value="{ThemeResource NotificationFlyoutPresenterBackgroundAccentBrush}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>