public ITabGroupManager Create(TabGroupManagerOptions options = null) { var mgr = new TabGroupManager(this, menuManager, wpfFocusManager, options); tabGroupManagers.Add(mgr); if (selectedIndex < 0) selectedIndex = 0; return mgr; }
internal void SetActive(TabGroupManager tabGroupManager) { int index = tabGroupManagers.IndexOf(tabGroupManager); Debug.Assert(index >= 0); if (index >= 0) { selectedIndex = index; } }
public ITabGroupManager Create(TabGroupManagerOptions options = null) { var mgr = new TabGroupManager(this, menuManager, wpfFocusManager, options); tabGroupManagers.Add(mgr); if (selectedIndex < 0) { selectedIndex = 0; } return(mgr); }
public TabGroup(TabGroupManager tabGroupManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options) { this.options = options; this.tabContentAttached = new WeakEventList<TabContentAttachedEventArgs>(); this.tabGroupManager = tabGroupManager; this.wpfFocusManager = wpfFocusManager; this.tabControl = new TabControl(); this.tabControl.DataContext = this; tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle"); this.tabControl.SelectionChanged += TabControl_SelectionChanged; if (options.InitializeContextMenu != null) this.contextMenuCreator = options.InitializeContextMenu(menuManager, this, this.tabControl); else if (options.TabGroupGuid != Guid.Empty) this.contextMenuCreator = menuManager.InitializeContextMenu(this.tabControl, options.TabGroupGuid, new GuidObjectsCreator(this)); }
public TabGroup(TabGroupManager tabGroupManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options) { this.options = options; this.tabContentAttached = new WeakEventList <TabContentAttachedEventArgs>(); this.tabGroupManager = tabGroupManager; this.wpfFocusManager = wpfFocusManager; this.tabControl = new TabControl(); this.tabControl.DataContext = this; tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle"); this.tabControl.SelectionChanged += TabControl_SelectionChanged; if (options.InitializeContextMenu != null) { this.contextMenuCreator = options.InitializeContextMenu(menuManager, this, this.tabControl); } else if (options.TabGroupGuid != Guid.Empty) { this.contextMenuCreator = menuManager.InitializeContextMenu(this.tabControl, options.TabGroupGuid, new GuidObjectsCreator(this)); } }
internal void SetActive(TabGroupManager tabGroupManager) { int index = tabGroupManagers.IndexOf(tabGroupManager); Debug.Assert(index >= 0); if (index >= 0) selectedIndex = index; }