/// <summary> /// Method to execute backStageExitCommand. /// </summary> /// <param name="parameter">Specifies the object parameter.</param> public void ExecuteBackStageExitCommand(object parameter) { ModelTab modelTabDemosView = parameter as ModelTab; if (modelTabDemosView != null) { modelTabDemosView.Close(); } }
/// <summary> /// Method to execute backStageExitCommand. /// </summary> /// <param name="parameter">Specifies the object parameter.</param> public void ExecuteBackStageExitCommand(object parameter) { ModelTab modelTabDemosView = parameter as ModelTab; if (modelTabDemosView != null) { modelTabDemosView.Close(); } else if ((ribbon.Parent as FrameworkElement).Parent as RibbonWindow != null) { RibbonWindow window = (ribbon.Parent as FrameworkElement).Parent as RibbonWindow; if (window != null) { window.Close(); } } }