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
@@ -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;
}
}
}