Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        void PopulateRibbonTabs()
        {
            CustomRibbonTab Tab1 = new CustomRibbonTab()
            {
                TabHeader = "Home"
            };
            CustomRibbonTab Tab2 = new CustomRibbonTab()
            {
                TabHeader = "Insert"
            };

            PopulateRibbonHomeBars(Tab1);
            PopulateRibbonInsertBars(Tab2);
            CustomRibbonTabs.Add(Tab1);
            CustomRibbonTabs.Add(Tab2);
        }
Exemplo n.º 3
0
        /// <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);
        }
Exemplo n.º 4
0
        /// <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);
        }
Exemplo n.º 5
0
 /// <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();
     }
 }