Пример #1
0
 public OpenFlyoutDetails(Flyout flyout)
 {
     Flyout = flyout;
     TaskCompletionSource = new TaskCompletionSource <Flyout>();
     FlyoutType           = flyout.GetType();
     IsHidden             = false;
     OpenFlyoutDetailGuid = Guid.NewGuid();
 }
Пример #2
0
        public void HideFlyout(Flyout flyout)
        {
            var actualType       = flyout.GetType();
            var openFlyoutDetail = openFlyouts.FirstOrDefault(x => x.FlyoutType == actualType);

            if (openFlyoutDetail != null)
            {
                openFlyoutDetail.IsHidden = true;
            }

            flyout.IsOpen = false;
        }
Пример #3
0
        public void CloseHiddenFlyout(Flyout flyout)
        {
            var actualType       = flyout.GetType();
            var openFlyoutDetail = openFlyouts.FirstOrDefault(x => x.FlyoutType == actualType);

            if (openFlyoutDetail != null)
            {
                openFlyoutDetail.IsHidden = false;
            }
            flyout.IsOpen = false;
            FlyoutClosedHandler(flyout, null);
        }
Пример #4
0
        public Task <Flyout> OpenFlyout(Flyout flyout)
        {
            var actualType       = flyout.GetType();
            var openFlyoutDetail = openFlyouts.FirstOrDefault(x => x.FlyoutType == actualType);

            if (openFlyoutDetail == null)
            {
                flyoutsControl.Items.Add(flyout);
                flyout.ClosingFinished += FlyoutClosedHandler;
                openFlyoutDetail        = new OpenFlyoutDetails(flyout);
                openFlyouts.Add(openFlyoutDetail);
            }

            openFlyoutDetail.IsHidden      = false;
            openFlyoutDetail.Flyout.IsOpen = true;

            return(openFlyoutDetail.TaskCompletionSource.Task);
        }