/// <summary> /// All this method does is push the supplied instance to the MainViewModel's list of flyouts. /// </summary> /// <param name="flyoutViewModelBase"></param> private void RegisterFlyout(FlyoutViewModelBase flyoutViewModelBase) { if (flyoutViewModelBase == null) throw new ArgumentNullException("flyoutViewModelBase"); var flyoutContainer = Util.AppMainWindow.DataContext as IFlyoutContainer; if(flyoutContainer != null && flyoutContainer.Flyouts!=null) { flyoutContainer.Flyouts.Add(flyoutViewModelBase); } }
/// <summary> /// Registers an instance of <see cref="FlyoutViewModelBase"/> that can be used in the application. /// </summary> /// <param name="flyoutViewModelBase"></param> void IMessagingService.RegisterFlyout(FlyoutViewModelBase flyoutViewModelBase) { RegisterFlyout(flyoutViewModelBase); }