示例#1
0
        /// <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();
            }
        }
示例#2
0
        /// <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();
                }
            }
        }