コード例 #1
0
 internal void HandleFlyoutStatusChange(Flyout flyout, int visibleFlyouts)
 {
     //checks a recently opened flyout's position.
     if (flyout.Position == Position.Right || flyout.Position == Position.Top)
     {
         //get it's zindex
         var zIndex = flyout.IsOpen ? Panel.GetZIndex(flyout) + 3 : visibleFlyouts + 2;
         if (this.ShowWindowCommandsOnTop) //if ShowWindowCommandsOnTop is true, set the window commands' zindex to a number that is higher than the flyout's.
         {
             WindowCommandsPresenter.SetValue(Panel.ZIndexProperty, zIndex);
         }
         WindowButtonCommands.SetValue(Panel.ZIndexProperty, zIndex);
     }
 }
コード例 #2
0
        internal void HandleFlyoutStatusChange(Flyout flyout, IEnumerable <Flyout> visibleFlyouts)
        {
            //checks a recently opened flyout's position.
            if (flyout.Position == Position.Right || flyout.Position == Position.Top)
            {
                //get it's zindex
                var zIndex = flyout.IsOpen ? Panel.GetZIndex(flyout) + 3 : visibleFlyouts.Count() + 2;
                if (this.ShowWindowCommandsOnTop) //if ShowWindowCommandsOnTop is true, set the window commands' zindex to a number that is higher than the flyout's.
                {
                    WindowCommandsPresenter.SetValue(Panel.ZIndexProperty, zIndex);
                }
                WindowButtonCommands.SetValue(Panel.ZIndexProperty, zIndex);
            }

            flyoutModal.Visibility = visibleFlyouts.Any(x => x.IsModal) ? Visibility.Visible : Visibility.Hidden;
        }