Beispiel #1
0
 public ITabGroupManager Create(TabGroupManagerOptions options = null)
 {
     var mgr = new TabGroupManager(this, menuManager, wpfFocusManager, options);
     tabGroupManagers.Add(mgr);
     if (selectedIndex < 0)
         selectedIndex = 0;
     return mgr;
 }
Beispiel #2
0
        internal void SetActive(TabGroupManager tabGroupManager)
        {
            int index = tabGroupManagers.IndexOf(tabGroupManager);

            Debug.Assert(index >= 0);
            if (index >= 0)
            {
                selectedIndex = index;
            }
        }
Beispiel #3
0
        public ITabGroupManager Create(TabGroupManagerOptions options = null)
        {
            var mgr = new TabGroupManager(this, menuManager, wpfFocusManager, options);

            tabGroupManagers.Add(mgr);
            if (selectedIndex < 0)
            {
                selectedIndex = 0;
            }
            return(mgr);
        }
Beispiel #4
0
 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));
 }
Beispiel #5
0
 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));
     }
 }
Beispiel #6
0
 internal void SetActive(TabGroupManager tabGroupManager)
 {
     int index = tabGroupManagers.IndexOf(tabGroupManager);
     Debug.Assert(index >= 0);
     if (index >= 0)
         selectedIndex = index;
 }