/// <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); }
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); } }
private static void IsAddButtonVisiblePropertyCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { ChromeTabControl ctc = d as ChromeTabControl; ChromeTabPanel panel = (ChromeTabPanel)ctc.ItemsHost; if (panel != null) { panel.InvalidateVisual(); } }
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(); } }