/// <summary> /// Method which is used to implement the openModelTab command. /// </summary> /// <param name="parameter">Model tab to be show and close.</param> public void ExecuteOpenModelTabCommand(object parameter) { CustomRibbonTabs.Clear(); CustomRibbonTab printPreviewTab = new CustomRibbonTab() { TabHeader = "Print Preview" }; PopulateRibbonPrintPreviewBars(printPreviewTab); CustomRibbonTabs.Add(printPreviewTab); }
void PopulateRibbonTabs() { CustomRibbonTab Tab1 = new CustomRibbonTab() { TabHeader = "Home" }; CustomRibbonTab Tab2 = new CustomRibbonTab() { TabHeader = "Insert" }; PopulateRibbonHomeBars(Tab1); PopulateRibbonInsertBars(Tab2); CustomRibbonTabs.Add(Tab1); CustomRibbonTabs.Add(Tab2); }
/// <summary> /// Adding ribbon tabs to the main ribbon window. /// </summary> void PopulateRibbonTabs() { CustomRibbonTab firstTab = new CustomRibbonTab() { TabHeader = "Home" }; CustomRibbonTab secondTab = new CustomRibbonTab() { TabHeader = "Insert" }; PopulateRibbonHomeBars(firstTab); PopulateRibbonInsertBars(secondTab); CustomRibbonTabs.Add(firstTab); CustomRibbonTabs.Add(secondTab); }
/// <summary> /// Method which is used to populate ribbon bar to ribbon tab. /// </summary> void PopulateRibbonTabs() { CustomRibbonTab homeTab = new CustomRibbonTab() { TabHeader = "Home" }; CustomRibbonTab insertTab = new CustomRibbonTab() { TabHeader = "Insert" }; PopulateRibbonHomeBars(homeTab); PopulateRibbonInsertBars(insertTab); CustomRibbonTabs.Add(homeTab); CustomRibbonTabs.Add(insertTab); }
/// <summary> /// Method which is used to implement the model tab action. /// </summary> /// <param name="parameter">Model tab to be show and close.</param> public void MyAction(string parameter) { if (parameter.Equals("Modal")) { CustomRibbonTabs.Clear(); CustomRibbonTab Tab3 = new CustomRibbonTab() { TabHeader = "Print Preview" }; PopulateRibbonPrintPreviewBars(Tab3); CustomRibbonTabs.Add(Tab3); } else if (parameter.Equals("CloseModal")) { CustomRibbonTabs.Clear(); PopulateRibbonTabs(); } }