Esempio n. 1
0
        private static void HandleCloseTabCommand(object sender, ExecutedRoutedEventArgs args)
        {
            ChromeTabItem item = sender as ChromeTabItem;

            if (item == null)
            {
                return;
            }
            item.Close();
        }
        private static void HandleCloseTabCommand(object sender, ExecutedRoutedEventArgs args)
        {
            ChromeTabItem item = sender as ChromeTabItem;

            if (!item.CanDelete)
            {
                MessageBox.Show("Cannot delete this tab.");
                return;
            }
            if (item == null)
            {
                return;
            }
            item.Close();
            if (item.TabItemHaveClosedHandler != null)
            {
                item.TabItemHaveClosedHandler(item);
            }
        }