public OpenFlyoutDetails(Flyout flyout) { Flyout = flyout; TaskCompletionSource = new TaskCompletionSource <Flyout>(); FlyoutType = flyout.GetType(); IsHidden = false; OpenFlyoutDetailGuid = Guid.NewGuid(); }
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; }
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); }
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); }