public static IDisposable PushFlyout(string flyoutName, object context) { if (flyoutName == null) { throw new ArgumentNullException(nameof(flyoutName)); } var handle = new FlyoutHandle(flyoutName, context); if (TargetElement == null) { QueuedFlyouts.Enqueue(handle); return(handle); } var oldFlyout = CurrentFlyout; Flyouts.Add(oldFlyout); var flyout = GetFlyout(handle); SwapFlyouts(oldFlyout, flyout); return(handle); }
public void AddOrUpdateFlyouts(IFlyoutBaseVm flyout) { var flyoutType = flyout.GetType(); var oldFlyout = Flyouts.FirstOrDefault(e => e.GetType().Name == flyoutType.Name); if (oldFlyout != null) { Flyouts.Remove(oldFlyout); } Flyouts.Add(BootStrapper.CreateFlyoutControl(flyout)); }
public void DoToggleFlyout(FlyoutBaseViewModel flyout) { if(!Flyouts.Contains(flyout)) { Flyouts.Add(flyout); } foreach(FlyoutBaseViewModel fbvw in Flyouts) { if (fbvw.Equals(flyout)) continue; fbvw.IsOpen = false; } flyout.IsOpen = !flyout.IsOpen; }