From 36f2953fd466ee7c959c5c0af7568f9331b213b9 Mon Sep 17 00:00:00 2001 From: Daniel Clark Date: Thu, 25 Feb 2021 15:08:45 +0000 Subject: [PATCH] Added NotificationFlyoutPlacement enum --- .../NotificationFlyout/NotificationFlyout.cs | 10 ++++++++++ .../NotificationFlyout/NotificationFlyoutPlacement.cs | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyoutPlacement.cs diff --git a/src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyout.cs b/src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyout.cs index 22adad4..51cb441 100644 --- a/src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyout.cs +++ b/src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyout.cs @@ -40,6 +40,11 @@ namespace TheXamlGuy.NotificationFlyout.Uwp.UI.Controls typeof(NotificationFlyoutContextMenu), typeof(NotificationFlyout), new PropertyMetadata(null, OnContextMenuPropertyChanged)); + public static DependencyProperty PlacementProperty = + DependencyProperty.Register(nameof(Placement), + typeof(NotificationFlyoutContextMenu), typeof(NotificationFlyout), + new PropertyMetadata(NotificationFlyoutPlacement.Auto)); + private static INotificationFlyoutApplication _applicationInstance; public event EventHandler Closed; @@ -80,6 +85,11 @@ namespace TheXamlGuy.NotificationFlyout.Uwp.UI.Controls set => SetValue(LightIconSourceProperty, value); } + public NotificationFlyoutPlacement Placement + { + get => (NotificationFlyoutPlacement)GetValue(PlacementProperty); + set => SetValue(PlacementProperty, value); + } public ElementTheme RequestedTheme { get => (ElementTheme)GetValue(RequestedThemeProperty); diff --git a/src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyoutPlacement.cs b/src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyoutPlacement.cs new file mode 100644 index 0000000..4fdcc4a --- /dev/null +++ b/src/TheXamlGuy.NotificationFlyout.Uwp.UI.Controls/NotificationFlyout/NotificationFlyoutPlacement.cs @@ -0,0 +1,11 @@ +namespace TheXamlGuy.NotificationFlyout.Uwp.UI.Controls +{ + public enum NotificationFlyoutPlacement + { + Auto, + Left, + Top, + Right, + Bottom + } +} \ No newline at end of file