fix issue with DPI

This commit is contained in:
Daniel Clark
2021-02-28 18:45:12 +00:00
parent 04de82cda0
commit b815985963
23 changed files with 355 additions and 156 deletions
@@ -4,23 +4,39 @@
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x64</Platforms>
<StartupObject>NotificationFlyoutSample.Host.Program</StartupObject>
<AssetTargetFallback>uap10.0.19041</AssetTargetFallback>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Toolkit.Wpf.UI.XamlHost" Version="6.1.2" />
<PackageReference Include="Microsoft.Win32.Registry" Version="6.0.0-preview.1.21102.12" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0-preview.1.21102.12" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Common\TheXamlGuy.NotificationFlyout.Common.csproj" />
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Shared.UI\TheXamlGuy.NotificationFlyout.Shared.UI.csproj" />
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls.csproj" />
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI\TheXamlGuy.NotificationFlyout.Wpf.UI.csproj" />
<ProjectReference Include="..\NotificationFlyoutSample\NotificationFlyoutSample.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="TheXamlGuy.NotificationFlyout.Common">
<HintPath>..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\bin\x64\Release\netcoreapp3.1\TheXamlGuy.NotificationFlyout.Common.dll</HintPath>
</Reference>
<Reference Include="TheXamlGuy.NotificationFlyout.Shared.UI">
<HintPath>..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\bin\x64\Release\netcoreapp3.1\TheXamlGuy.NotificationFlyout.Shared.UI.dll</HintPath>
</Reference>
<Reference Include="TheXamlGuy.NotificationFlyout.Uwp.UI.Controls">
<HintPath>..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\bin\x64\Release\netcoreapp3.1\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls.dll</HintPath>
</Reference>
<Reference Include="TheXamlGuy.NotificationFlyout.Wpf.UI">
<HintPath>..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\bin\x64\Release\netcoreapp3.1\TheXamlGuy.NotificationFlyout.Wpf.UI.dll</HintPath>
</Reference>
<Reference Include="TheXamlGuy.NotificationFlyout.Wpf.UI.Controls">
<HintPath>..\..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\bin\x64\Release\netcoreapp3.1\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.VCRTForwarders.140" Version="1.0.7" />
</ItemGroup>
@@ -15,6 +15,7 @@ namespace NotificationFlyoutSample.Host
{
Flyout = new SampleFlyout()
};
app.Run();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@@ -0,0 +1,83 @@
<?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>faa7e8e0-032d-4c2a-bab6-6e0eed3d5a6d</ProjectGuid>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<EntryPointProjectUniqueName>..\NotificationFlyoutSample.Launcher\NotificationFlyoutSample.Launcher.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.Launcher\NotificationFlyoutSample.Launcher.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
</Project>
@@ -0,0 +1,49 @@
<?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="541ef8e5-df48-4089-bae4-7851e8c5d592"
Publisher="CN=Daniel Clark"
Version="1.0.0.0" />
<Properties>
<DisplayName>NotificationFlyoutSample.Package</DisplayName>
<PublisherDisplayName>Daniel Clark</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>
+32 -110
View File
@@ -10,18 +10,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Shared.UI", "..\src\TheXamlGuy.NotificationFlyout.Shared.UI\TheXamlGuy.NotificationFlyout.Shared.UI.csproj", "{38E34B61-E389-4EE1-8D5E-5372568DE982}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Uwp.UI.Controls", "..\src\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls.csproj", "{ACA2CC23-A9AE-427F-A900-ED75A96698F4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Wpf.UI.Controls", "..\src\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls\TheXamlGuy.NotificationFlyout.Wpf.UI.Controls.csproj", "{BE3B1281-CD44-4291-BE1D-33FC13E61E06}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Wpf.UI", "..\src\TheXamlGuy.NotificationFlyout.Wpf.UI\TheXamlGuy.NotificationFlyout.Wpf.UI.csproj", "{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheXamlGuy.NotificationFlyout.Common", "..\src\TheXamlGuy.NotificationFlyout.Common\TheXamlGuy.NotificationFlyout.Common.csproj", "{293834F2-4A99-4C92-A165-7C617D98FCC7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotificationFlyoutSample.Launcher", "NotificationFlyoutSample.Launcher\NotificationFlyoutSample.Launcher.csproj", "{5EDD254A-3F8E-4825-B806-5C230488E192}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "NotificationFlyoutSample.Package", "NotificationFlyoutSample.Package\NotificationFlyoutSample.Package.wapproj", "{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -63,106 +55,6 @@ 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
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|ARM.ActiveCfg = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|ARM.Build.0 = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|ARM64.Build.0 = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|x64.ActiveCfg = Debug|x64
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|x64.Build.0 = Debug|x64
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|x86.ActiveCfg = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Debug|x86.Build.0 = Debug|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|Any CPU.Build.0 = Release|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|ARM.ActiveCfg = Release|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|ARM.Build.0 = Release|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|ARM64.ActiveCfg = Release|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|ARM64.Build.0 = Release|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|x64.ActiveCfg = Release|x64
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|x64.Build.0 = Release|x64
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|x86.ActiveCfg = Release|Any CPU
{38E34B61-E389-4EE1-8D5E-5372568DE982}.Release|x86.Build.0 = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|ARM.ActiveCfg = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|ARM.Build.0 = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|ARM64.Build.0 = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|x64.ActiveCfg = Debug|x64
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|x64.Build.0 = Debug|x64
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|x86.ActiveCfg = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Debug|x86.Build.0 = Debug|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|Any CPU.Build.0 = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|ARM.ActiveCfg = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|ARM.Build.0 = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|ARM64.ActiveCfg = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|ARM64.Build.0 = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|x64.ActiveCfg = Release|x64
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|x64.Build.0 = Release|x64
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|x86.ActiveCfg = Release|Any CPU
{ACA2CC23-A9AE-427F-A900-ED75A96698F4}.Release|x86.Build.0 = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|ARM.ActiveCfg = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|ARM.Build.0 = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|ARM64.Build.0 = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|x64.ActiveCfg = Debug|x64
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|x64.Build.0 = Debug|x64
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|x86.ActiveCfg = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Debug|x86.Build.0 = Debug|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|Any CPU.Build.0 = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|ARM.ActiveCfg = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|ARM.Build.0 = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|ARM64.ActiveCfg = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|ARM64.Build.0 = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|x64.ActiveCfg = Release|x64
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|x64.Build.0 = Release|x64
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|x86.ActiveCfg = Release|Any CPU
{BE3B1281-CD44-4291-BE1D-33FC13E61E06}.Release|x86.Build.0 = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|ARM.ActiveCfg = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|ARM.Build.0 = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|ARM64.Build.0 = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|x64.ActiveCfg = Debug|x64
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|x64.Build.0 = Debug|x64
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|x86.ActiveCfg = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Debug|x86.Build.0 = Debug|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|Any CPU.Build.0 = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|ARM.ActiveCfg = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|ARM.Build.0 = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|ARM64.ActiveCfg = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|ARM64.Build.0 = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|x64.ActiveCfg = Release|x64
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|x64.Build.0 = Release|x64
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|x86.ActiveCfg = Release|Any CPU
{A38BA7F7-5FEC-49F2-9FEB-F80AFE5934AF}.Release|x86.Build.0 = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|ARM.ActiveCfg = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|ARM.Build.0 = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|ARM64.Build.0 = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|x64.ActiveCfg = Debug|x64
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|x64.Build.0 = Debug|x64
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|x86.ActiveCfg = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Debug|x86.Build.0 = Debug|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|Any CPU.Build.0 = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|ARM.ActiveCfg = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|ARM.Build.0 = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|ARM64.ActiveCfg = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|ARM64.Build.0 = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|x64.ActiveCfg = Release|x64
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|x64.Build.0 = Release|x64
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|x86.ActiveCfg = Release|Any CPU
{293834F2-4A99-4C92-A165-7C617D98FCC7}.Release|x86.Build.0 = Release|Any CPU
{5EDD254A-3F8E-4825-B806-5C230488E192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EDD254A-3F8E-4825-B806-5C230488E192}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EDD254A-3F8E-4825-B806-5C230488E192}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -183,6 +75,36 @@ Global
{5EDD254A-3F8E-4825-B806-5C230488E192}.Release|x64.Build.0 = Release|x64
{5EDD254A-3F8E-4825-B806-5C230488E192}.Release|x86.ActiveCfg = Release|Any CPU
{5EDD254A-3F8E-4825-B806-5C230488E192}.Release|x86.Build.0 = Release|Any CPU
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|ARM.ActiveCfg = Debug|ARM
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|ARM.Build.0 = Debug|ARM
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|ARM.Deploy.0 = Debug|ARM
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|ARM64.ActiveCfg = Debug|ARM64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|ARM64.Build.0 = Debug|ARM64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|ARM64.Deploy.0 = Debug|ARM64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|x64.ActiveCfg = Debug|x64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|x64.Build.0 = Debug|x64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|x64.Deploy.0 = Debug|x64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|x86.ActiveCfg = Debug|x86
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|x86.Build.0 = Debug|x86
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Debug|x86.Deploy.0 = Debug|x86
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|Any CPU.Build.0 = Release|Any CPU
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|Any CPU.Deploy.0 = Release|Any CPU
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|ARM.ActiveCfg = Release|ARM
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|ARM.Build.0 = Release|ARM
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|ARM.Deploy.0 = Release|ARM
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|ARM64.ActiveCfg = Release|ARM64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|ARM64.Build.0 = Release|ARM64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|ARM64.Deploy.0 = Release|ARM64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|x64.ActiveCfg = Release|x64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|x64.Build.0 = Release|x64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|x64.Deploy.0 = Release|x64
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|x86.ActiveCfg = Release|x86
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|x86.Build.0 = Release|x86
{FAA7E8E0-032D-4C2A-BAB6-6E0EED3D5A6D}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -123,6 +123,9 @@
<Compile Include="SampleFlyout.xaml.cs">
<DependentUpon>SampleFlyout.xaml</DependentUpon>
</Compile>
<Compile Include="Test.xaml.cs">
<DependentUpon>Test.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
@@ -161,16 +164,20 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Test.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">
<Project>{a970d11a-ad9f-4a3f-a509-16fa5f9ac779}</Project>
<Name>TheXamlGuy.NotificationFlyout.Uwp.UI.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\TheXamlGuy.NotificationFlyout.Shared.UI\TheXamlGuy.NotificationFlyout.Shared.UI.csproj">
<Project>{a970d11a-ad9f-4a3f-a509-16fa5f9ac779}</Project>
<Name>TheXamlGuy.NotificationFlyout.Shared.UI</Name>
</ProjectReference>
<Reference Include="TheXamlGuy.NotificationFlyout.Shared.UI, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\src\TheXamlGuy.NotificationFlyout.Shared.UI\bin\x64\Release\uap10.0.19041\TheXamlGuy.NotificationFlyout.Shared.UI.dll</HintPath>
</Reference>
<Reference Include="TheXamlGuy.NotificationFlyout.Uwp.UI.Controls, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\src\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls\bin\x64\Release\uap10.0.19041\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
@@ -9,8 +9,7 @@
</MenuFlyout>
</controls:NotificationFlyout.ContextFlyout>
<StackPanel
Width="400"
Height="500"
Margin="24"
VerticalAlignment="Top">
<ToggleSwitch
@@ -23,5 +22,11 @@
<ComboBoxItem Content="Auto" />
<ComboBoxItem Content="FullRight" />
</ComboBox>
<Slider />
<TextBox />
<CalendarDatePicker />
<CalendarView />
<Button Content="hello" Click="Button_Click" />
<TimePicker />
</StackPanel>
</controls:NotificationFlyout>
@@ -43,5 +43,11 @@ namespace NotificationFlyoutSample
this.Placement = NotificationFlyoutPlacement.FullRight;
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
var app = GetApplication();
app.OpenAsWindow<Test>();
}
}
}
@@ -0,0 +1,25 @@
<UserControl
x:Class="NotificationFlyoutSample.Test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:NotificationFlyoutSample"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
d:DesignHeight="300"
d:DesignWidth="400"
mc:Ignorable="d">
<Grid>
<Button Click="TestButtonClick1" Content="Show TeachingTip" />
<muxc:TeachingTip x:Name="ToggleThemeTeachingTip1" ShouldConstrainToRootBounds="False">
<muxc:TeachingTip.Content>
<Border Width="500" Height="500">
<Slider />
</Border>
</muxc:TeachingTip.Content>
</muxc:TeachingTip>
</Grid>
</UserControl>
@@ -0,0 +1,33 @@
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 NotificationFlyoutSample
{
public sealed partial class Test : UserControl
{
public Test()
{
this.InitializeComponent();
}
private void TestButtonClick1(object sender, RoutedEventArgs e)
{
ToggleThemeTeachingTip1.XamlRoot = this.XamlRoot;
ToggleThemeTeachingTip1.IsOpen = true;
}
}
}
@@ -7,6 +7,7 @@ using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Shapes;
namespace TheXamlGuy.NotificationFlyout.Uwp.UI.Controls
{
@@ -226,8 +227,26 @@ namespace TheXamlGuy.NotificationFlyout.Uwp.UI.Controls
}
internal void UpdateTheme(bool isColorPrevalence) => VisualStateManager.GoToState(this, isColorPrevalence ? "ColorPrevalenceTheme" : "DefaultTheme", true);
private Rectangle _topThumb;
private Grid _layoutRoot;
protected override void OnManipulationDelta(ManipulationDeltaRoutedEventArgs e)
{
base.OnManipulationDelta(e);
}
protected override void OnApplyTemplate()
{
_layoutRoot = GetTemplateChild("LayoutRoot") as Grid;
_layoutRoot.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
_topThumb = GetTemplateChild("TopThumb") as Rectangle;
_topThumb.ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY;
_topThumb.ManipulationDelta += _topThumb_ManipulationDelta;
_topThumb.PointerPressed += _topThumb_PointerPressed;
_topThumb.PointerReleased += _topThumb_PointerReleased;
_container = GetTemplateChild("Container") as Border;
if (_container != null)
{
@@ -255,6 +274,33 @@ namespace TheXamlGuy.NotificationFlyout.Uwp.UI.Controls
}
}
private void _topThumb_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
_layoutRoot.Height = _layoutRoot.ActualHeight;
_layoutRoot.Height -= e.Delta.Translation.Y ;
_popup.SetValue(Popup.VerticalOffsetProperty, _popup.VerticalOffset += e.Delta.Translation.Y);
}
private void _topThumb_PointerReleased(object sender, PointerRoutedEventArgs e)
{
// XamlRoot.Content.ReleasePointerCapture(e.Pointer);
}
private void _topThumb_PointerPressed(object sender, PointerRoutedEventArgs e)
{
//XamlRoot.Content.CapturePointer(e.Pointer);
}
private void _topThumb_DragDelta(object sender, DragDeltaEventArgs e)
{
_layoutRoot.Height = _layoutRoot.ActualHeight;
_layoutRoot.Height -= e.VerticalChange;
_popup.SetValue(Popup.VerticalOffsetProperty, _popup.VerticalOffset += e.VerticalChange);
}
private static void OnIconPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
{
var sender = dependencyObject as NotificationFlyout;
@@ -50,6 +50,9 @@
<EntranceThemeTransition x:Name="EntranceThemeTransition" />
</TransitionCollection>
</Border.Transitions>
<Grid>
<ScrollViewer
x:Name="ScrollViewer"
AutomationProperties.AccessibilityView="Raw"
@@ -67,6 +70,12 @@
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}" />
</ScrollViewer>
<Rectangle
x:Name="TopThumb"
Height="10"
VerticalAlignment="Top"
Fill="Red" />
</Grid>
</Border>
</Grid>
<VisualStateManager.VisualStateGroups>
@@ -22,6 +22,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TheXamlGuy.NotificationFlyout.Common\TheXamlGuy.NotificationFlyout.Common.csproj" />
<ProjectReference Include="..\TheXamlGuy.NotificationFlyout.Shared.UI\TheXamlGuy.NotificationFlyout.Shared.UI.csproj" />
<ProjectReference Include="..\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls\TheXamlGuy.NotificationFlyout.Uwp.UI.Controls.csproj" />
<ProjectReference Include="..\TheXamlGuy.NotificationFlyout.Wpf.UI\TheXamlGuy.NotificationFlyout.Wpf.UI.csproj" />
</ItemGroup>
@@ -2,6 +2,7 @@
using TheXamlGuy.NotificationFlyout.Wpf.UI.Extensions;
using System.Windows;
using System.Windows.Media;
using System;
namespace TheXamlGuy.NotificationFlyout.Wpf.UI.Controls
{
@@ -9,11 +10,9 @@ namespace TheXamlGuy.NotificationFlyout.Wpf.UI.Controls
{
internal const double WindowSize = 0;
public TransparentXamlHost()
{
Loaded += OnLoaded;
PrepareDefaultWindow();
}
public TransparentXamlHost() => PrepareDefaultWindow();
protected override void OnContentRendered(EventArgs args) => Visibility = Visibility.Hidden;
protected override WindowsXamlHost OnPreparingXamlHost(WindowsXamlHost xamlHost)
{
@@ -22,16 +21,9 @@ namespace TheXamlGuy.NotificationFlyout.Wpf.UI.Controls
return base.OnPreparingXamlHost(xamlHost);
}
private void OnLoaded(object sender, RoutedEventArgs args)
{
this.Hidden();
}
private void PrepareDefaultWindow()
{
ShowInTaskbar = false;
ShowActivated = false;
WindowStyle = WindowStyle.None;
ResizeMode = ResizeMode.NoResize;
AllowsTransparency = true;
@@ -31,7 +31,11 @@ namespace TheXamlGuy.NotificationFlyout.Wpf.UI.Extensions
public static void Hidden(this Window window)
{
var handle = window.GetHandle();
PInvoke.SetWindowLong((HWND)handle, GWL_EX_STYLE, (PInvoke.GetWindowLong((HWND)handle, GWL_EX_STYLE) | (int)WindowFlag.WS_EX_TOOLWINDOW) & ~(int)WindowFlag.WS_EX_APPWINDOW);
int exStyle = (int)PInvoke.GetWindowLong((HWND)handle, (int)GWL_EX_STYLE);
exStyle |= (int)WindowFlag.WS_EX_APPWINDOW;
PInvoke.SetWindowLong((HWND)handle, (int)GWL_EX_STYLE, exStyle);
}
public static void SetTopAll(this Window window)
@@ -20,7 +20,6 @@
<ItemGroup>
<ProjectReference Include="..\TheXamlGuy.NotificationFlyout.Common\TheXamlGuy.NotificationFlyout.Common.csproj" />
<ProjectReference Include="..\TheXamlGuy.NotificationFlyout.Shared.UI\TheXamlGuy.NotificationFlyout.Shared.UI.csproj" />
</ItemGroup>
</Project>