Example #1
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));
 }
Example #2
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));
     }
 }