示例#1
0
        /// <summary>
        /// Grabs hold of the tab based on the input viewmodel and positions it at the mouse cursor.
        /// </summary>
        /// <param name="viewModel"></param>
        public void GrabTab(object viewModel)
        {
            ChromeTabPanel p    = (ChromeTabPanel)ItemsHost;
            ChromeTabItem  item = AsTabItem(viewModel);

            p.StartTabDrag(item, true);
        }
示例#2
0
        private static void OnAddButtonTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ChromeTabControl ctc   = (ChromeTabControl)d;
            ChromeTabPanel   panel = ctc.ItemsHost as ChromeTabPanel;

            if (panel != null)
            {
                panel.SetAddButtonControlTemplate(e.NewValue as ControlTemplate);
            }
        }
示例#3
0
        private static void IsAddButtonVisiblePropertyCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ChromeTabControl ctc = d as ChromeTabControl;

            ChromeTabPanel panel = (ChromeTabPanel)ctc.ItemsHost;

            if (panel != null)
            {
                panel.InvalidateVisual();
            }
        }
示例#4
0
        private static void IsAddButtonVisiblePropertyCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(d))
            {
                return;
            }
            ChromeTabControl ctc = d as ChromeTabControl;

            ChromeTabPanel panel = (ChromeTabPanel)ctc.ItemsHost;

            if (panel != null)
            {
                panel.InvalidateVisual();
            }
        }