From d25744a9f469b917f129701c538a41036f07dd86 Mon Sep 17 00:00:00 2001 From: Daniel Clark Date: Thu, 25 Feb 2021 17:39:19 +0000 Subject: [PATCH] Added ability to set Auto or Right flyout placement --- .../SampleFlyout.xaml | 3 +- .../Helpers/TaskbarHelper.cs | 2 +- .../Helpers/TaskbarPosition.cs | 2 +- .../Helpers/TaskbarState.cs | 2 +- .../NotificationFlyout/NotificationFlyout.cs | 19 ++- .../NotificationFlyoutPlacement.cs | 5 +- ...NotificationFlyoutContextMenuFlyoutHost.cs | 0 ...tificationFlyoutContextMenuFlyoutHost.xaml | 0 .../NotificationFlyoutPresenter.cs | 2 - .../NotificationFlyoutPresenter.xaml | 6 + .../NotificationFlyoutPresenterHost.cs} | 21 +-- .../NotificationFlyoutPresenterHost.xaml} | 17 +-- .../NotificationFlyoutPresenterPlacement.cs | 11 ++ ....NotificationFlyout.Uwp.UI.Controls.csproj | 4 +- .../Themes/Generic.xaml | 4 +- .../NotificationFlyoutXamlHost.cs | 126 +++++++++++------- 16 files changed, 142 insertions(+), 82 deletions(-) rename src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/{NotificationFlyoutHost => NotificationFlyoutPresenter}/NotificationFlyoutContextMenuFlyoutHost.cs (100%) rename src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/{NotificationFlyoutHost => NotificationFlyoutPresenter}/NotificationFlyoutContextMenuFlyoutHost.xaml (100%) rename src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/{NotificationFlyoutHost/NotificationFlyoutHost.cs => NotificationFlyoutPresenter/NotificationFlyoutPresenterHost.cs} (87%) rename src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/{NotificationFlyoutHost/NotificationFlyoutHost.xaml => NotificationFlyoutPresenter/NotificationFlyoutPresenterHost.xaml} (85%) create mode 100644 src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyoutPresenter/NotificationFlyoutPresenterPlacement.cs diff --git a/samples/NotificationFlyoutSample/SampleFlyout.xaml b/samples/NotificationFlyoutSample/SampleFlyout.xaml index b634536..81e26bc 100644 --- a/samples/NotificationFlyoutSample/SampleFlyout.xaml +++ b/samples/NotificationFlyoutSample/SampleFlyout.xaml @@ -2,7 +2,8 @@ x:Class="NotificationFlyoutSample.SampleFlyout" 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:controls="using:TheXamlGuy.NotificationFlyout.Uwp.UI.Controls" + Placement="Right">