diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml index 25999907..e9d98207 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml @@ -16,8 +16,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml.cs index 9cac7212..13f2885d 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarApplicationControl.xaml.cs @@ -10,6 +10,7 @@ using System.Linq; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using System.Windows.Threading; using SafeExamBrowser.Applications.Contracts; @@ -42,6 +43,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls Button.MouseEnter += (o, args) => WindowPopup.IsOpen = WindowStackPanel.Children.Count > 0; Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = WindowPopup.IsMouseOver)); Button.ToolTip = application.Tooltip; + WindowPopup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(WindowPopup_PlacementCallback); WindowPopup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = IsMouseOver)); WindowPopup.Opened += (o, args) => @@ -74,6 +76,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls } } + private CustomPopupPlacement[] WindowPopup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void Update() { var windows = application.GetWindows(); diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml index 3d26dcee..64d94868 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml @@ -16,8 +16,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml.cs index 7e87b914..ac1924ed 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarAudioControl.xaml.cs @@ -52,6 +52,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls MuteButton.Click += MuteButton_Click; MutedIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Audio_Muted.xaml") }; NoDeviceIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Audio_NoDevice.xaml") }; + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver)); Volume.ValueChanged += Volume_ValueChanged; @@ -99,6 +100,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls } } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void Volume_DragStarted(object sender, DragStartedEventArgs e) { Volume.ValueChanged -= Volume_ValueChanged; diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml index 1c1e48ee..62e8e324 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml @@ -16,8 +16,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml.cs index a8202338..a3cdeece 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarKeyboardLayoutControl.xaml.cs @@ -9,7 +9,9 @@ using System; using System.Linq; using System.Threading.Tasks; +using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.SystemComponents.Contracts.Keyboard; @@ -45,6 +47,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls keyboard.LayoutChanged += Keyboard_LayoutChanged; Button.Click += (o, args) => Popup.IsOpen = !Popup.IsOpen; Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver)); + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver)); Popup.Opened += (o, args) => @@ -65,6 +68,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls Dispatcher.InvokeAsync(() => SetCurrent(layout)); } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void InitializeLayouts() { foreach (var layout in keyboard.GetLayouts()) diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml index 538ce678..c91e5811 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml @@ -14,8 +14,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml.cs index 3792600b..55f8e896 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarPowerSupplyControl.xaml.cs @@ -9,6 +9,7 @@ using System; using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using System.Windows.Threading; using SafeExamBrowser.I18n.Contracts; @@ -49,6 +50,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls initialBrush = BatteryCharge.Fill; maxWidth = BatteryCharge.Width; powerSupply.StatusChanged += PowerSupply_StatusChanged; + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); UpdateStatus(powerSupply.GetStatus()); } @@ -57,6 +59,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls ClosePopup(); } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void PowerSupply_StatusChanged(IPowerSupplyStatus status) { Dispatcher.InvokeAsync(() => UpdateStatus(status)); diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml index 3030c42b..69455a64 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml @@ -17,8 +17,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml.cs index 98f6ad05..4313a9ec 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/TaskbarWirelessNetworkControl.xaml.cs @@ -10,6 +10,7 @@ using System; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using FontAwesome.WPF; using SafeExamBrowser.Applications.Contracts.Resources.Icons; @@ -46,6 +47,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls SignalStrengthIcon.Child = GetIcon(0); Button.Click += (o, args) => Popup.IsOpen = !Popup.IsOpen; Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver)); + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver)); Popup.Opened += (o, args) => @@ -74,6 +76,14 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls } } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void WirelessAdapter_NetworksChanged() { Dispatcher.InvokeAsync(UpdateNetworks); diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml index af5d3b89..03b478ca 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml @@ -16,8 +16,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml.cs index df16c255..ca2c3ad6 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarApplicationControl.xaml.cs @@ -10,6 +10,7 @@ using System.Linq; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using System.Windows.Threading; using SafeExamBrowser.Applications.Contracts; @@ -42,6 +43,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls Button.MouseEnter += (o, args) => WindowPopup.IsOpen = WindowStackPanel.Children.Count > 0; Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = WindowPopup.IsMouseOver)); Button.ToolTip = application.Tooltip; + WindowPopup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(WindowPopup_PlacementCallback); WindowPopup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => WindowPopup.IsOpen = IsMouseOver)); WindowPopup.Opened += (o, args) => @@ -74,6 +76,14 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls } } + private CustomPopupPlacement[] WindowPopup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void Update() { var windows = application.GetWindows(); diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml index 14050e75..8a8f7b3b 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml @@ -16,8 +16,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml.cs index eefb28a4..83dc5e1f 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarAudioControl.xaml.cs @@ -52,6 +52,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls MuteButton.Click += MuteButton_Click; MutedIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Mobile;component/Images/Audio_Muted.xaml") }; NoDeviceIcon = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Mobile;component/Images/Audio_NoDevice.xaml") }; + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver)); Volume.ValueChanged += Volume_ValueChanged; @@ -99,6 +100,14 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls } } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void Volume_DragStarted(object sender, DragStartedEventArgs e) { Volume.ValueChanged -= Volume_ValueChanged; diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml index 7145d747..50d02085 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml @@ -16,8 +16,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml.cs index 9e6f862b..c3dde04a 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarKeyboardLayoutControl.xaml.cs @@ -9,7 +9,9 @@ using System; using System.Linq; using System.Threading.Tasks; +using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.SystemComponents.Contracts.Keyboard; @@ -45,6 +47,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls keyboard.LayoutChanged += Keyboard_LayoutChanged; Button.Click += (o, args) => Popup.IsOpen = !Popup.IsOpen; Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver)); + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver)); Popup.Opened += (o, args) => @@ -65,6 +68,14 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls Dispatcher.InvokeAsync(() => SetCurrent(layout)); } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void InitializeLayouts() { foreach (var layout in keyboard.GetLayouts()) diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml index 61b14e49..34338ca5 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml @@ -14,8 +14,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml.cs index 819d076e..c2e2c792 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarPowerSupplyControl.xaml.cs @@ -9,6 +9,7 @@ using System; using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using System.Windows.Threading; using SafeExamBrowser.I18n.Contracts; @@ -49,6 +50,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls initialBrush = BatteryCharge.Fill; maxWidth = BatteryCharge.Width; powerSupply.StatusChanged += PowerSupply_StatusChanged; + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); UpdateStatus(powerSupply.GetStatus()); } @@ -57,6 +59,14 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls ClosePopup(); } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void PowerSupply_StatusChanged(IPowerSupplyStatus status) { Dispatcher.InvokeAsync(() => UpdateStatus(status)); diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml index 402b5750..71a867bf 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml @@ -17,8 +17,8 @@ - - + + diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml.cs index 6a44cb23..cdebcce3 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/TaskbarWirelessNetworkControl.xaml.cs @@ -10,6 +10,7 @@ using System; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Controls.Primitives; using System.Windows.Media; using FontAwesome.WPF; using SafeExamBrowser.Applications.Contracts.Resources.Icons; @@ -46,6 +47,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls SignalStrengthIcon.Child = GetIcon(0); Button.Click += (o, args) => Popup.IsOpen = !Popup.IsOpen; Button.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = Popup.IsMouseOver)); + Popup.CustomPopupPlacementCallback = new CustomPopupPlacementCallback(Popup_PlacementCallback); Popup.MouseLeave += (o, args) => Task.Delay(250).ContinueWith(_ => Dispatcher.Invoke(() => Popup.IsOpen = IsMouseOver)); Popup.Opened += (o, args) => @@ -74,6 +76,14 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls } } + private CustomPopupPlacement[] Popup_PlacementCallback(Size popupSize, Size targetSize, Point offset) + { + return new[] + { + new CustomPopupPlacement(new Point(targetSize.Width / 2 - popupSize.Width / 2, -popupSize.Height), PopupPrimaryAxis.None) + }; + } + private void WirelessAdapter_NetworksChanged() { Dispatcher.InvokeAsync(UpdateNetworks);