Example #1
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;
        }
Example #2
0
        public void CloseFlyout(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);
        }
Example #3
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;
        }
Example #4
0
 public OpenFlyoutDetails(Flyout flyout)
 {
     Flyout = flyout;
     TaskCompletionSource = new TaskCompletionSource<Flyout>();
     FlyoutType = flyout.GetType();
     IsHidden = false;
     OpenFlyoutDetailGuid = Guid.NewGuid();
 }