private void GenerateTabs() { tabs = new ObservableCollection<TabViewModel>(); TabViewModel homeTab = new TabViewModel(); homeTab.Text = "Home"; TabViewModel viewTab = new TabViewModel(); viewTab.Text = "View"; TabViewModel textTab = new TabViewModel(); textTab.Text = "Text"; homeTab.Groups.Add(GetClipboardGroup()); homeTab.Groups.Add(GetImageGroup()); homeTab.Groups.Add(GetToolsGroup()); homeTab.Groups.Add(GetBrushesGroup()); viewTab.Groups.Add(GetGroup("Zoom")); viewTab.Groups.Add(GetGroup("Show")); viewTab.Groups.Add(GetGroup("Display")); textTab.Groups.Add(GetGroup("Clipboard")); textTab.Groups.Add(GetGroup("Font")); textTab.Groups.Add(GetGroup("Background")); textTab.Groups.Add(GetGroup("colors")); Tabs.Add(homeTab); Tabs.Add(viewTab); Tabs.Add(textTab); quickAccessItems = new ObservableCollection<ButtonViewModel>(); quickAccessItems.Add(GetButton("save", "Save", false)); quickAccessItems.Add(GetButton("undo", "Undo", false)); quickAccessItems.Add(GetButton("print", "Print", false)); applicationMenuItems = new ObservableCollection<ButtonViewModel>(); applicationMenuItems.Add(GetButton("save", "Save", true)); applicationMenuItems.Add(GetButton("undo", "Undo", true)); applicationMenuItems.Add(GetButton("print", "Print", true)); addTab = new DelegateCommand(AddTabHandler); addGroup = new DelegateCommand(AddGroupHandler); addButton = new DelegateCommand(AddButtonHandler); removeTab = new DelegateCommand(RemoveTabHandler); }
private void AddTabHandler(object o) { TabViewModel tab = new TabViewModel(); tab.Text = "New tab"; this.Tabs.Add(tab); }