private void TrayFlyoutToggleButton_Click(Object sender, RoutedEventArgs e)
 {
     //var targetToggleButton = sender as ToggleButton;
     //var targetWindow = targetToggleButton.Tag as PlexWindow;
     if (TrayFlyoutToggleButton.IsChecked == true)
     {
         Point nonScaledButtonPoint = TrayFlyoutToggleButton.PointToScreen(new Point(0, 0));
         var   buttonPoint          = new Point(RealPixelsToWpfUnits(nonScaledButtonPoint.X),
                                                RealPixelsToWpfUnits(nonScaledButtonPoint.Y));
         Double targetLeftPos = buttonPoint.X + TrayFlyoutToggleButton.Width / 2 - TrayFlyout.ActualWidth / 2;
         Double targetTopPos  =
             RealPixelsToWpfUnits(TaskbarRootGrid.PointToScreen(new Point(0, 0)).Y) - 10 -
             TrayFlyout.ActualHeight;
         TrayFlyout.Left = targetLeftPos;
         TrayFlyout.Top  = targetTopPos;
         TrayFlyout.Show();
         TrayFlyout.Left = targetLeftPos;
         TrayFlyout.Top  = targetTopPos;
         //targetWindow.Top = (buttonPoint.Y + (targetToggleButton.Height / 2)) - (targetWindow.Height / 2);
     }
     else
     {
         TrayFlyout.Hide();
     }
 }
 private void TrayFlyout_Deactivated(Object sender, EventArgs e)
 {
     TrayFlyout.Hide();
     TrayFlyoutToggleButton.IsChecked = false;
 }