Example #1
0
		public TabService(IMenuService menuService, IWpfFocusService wpfFocusService) {
			this.menuService = menuService;
			this.wpfFocusService = wpfFocusService;
			tabGroupServices = new List<TabGroupService>();
			selectedIndex = -1;
		}
Example #2
0
		TabServiceProvider(IMenuService menuService, IWpfFocusService wpfFocusService) {
			this.menuService = menuService;
			this.wpfFocusService = wpfFocusService;
		}
Example #3
0
		public TabGroup(TabGroupService tabGroupService, IMenuService menuService, IWpfFocusService wpfFocusService, TabGroupServiceOptions options) {
			this.options = options;
			tabContentAttached = new WeakEventList<TabContentAttachedEventArgs>();
			this.tabGroupService = tabGroupService;
			this.wpfFocusService = wpfFocusService;
			tabControl = new TabControl();
			tabControl.DataContext = this;
			tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle");
			tabControl.SelectionChanged += TabControl_SelectionChanged;
			tabControl.PreviewKeyDown += TabControl_PreviewKeyDown;
			if (options.InitializeContextMenu != null)
				contextMenuProvider = options.InitializeContextMenu(menuService, this, tabControl);
			else if (options.TabGroupGuid != Guid.Empty)
				contextMenuProvider = menuService.InitializeContextMenu(tabControl, options.TabGroupGuid, new GuidObjectsProvider(this));
		}
Example #4
0
		public TabGroupService(TabService tabService, IMenuService menuService, IWpfFocusService wpfFocusService, TabGroupServiceOptions options) {
			this.options = (options ?? new TabGroupServiceOptions()).Clone();
			stackedContent = new StackedContent<TabGroup>();
			tabSelectionChanged = new WeakEventList<TabSelectedEventArgs>();
			tabGroupSelectionChanged = new WeakEventList<TabGroupSelectedEventArgs>();
			tabGroupCollectionChanged = new WeakEventList<TabGroupCollectionChangedEventArgs>();
			this.tabService = tabService;
			this.menuService = menuService;
			this.wpfFocusService = wpfFocusService;
			_activeIndex = -1;
		}