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
        /// <summary>
        /// Method which is used to populate ribbon bar to ribbon tab.
        /// </summary>
        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>
        /// 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.º 4
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();
     }
 }
Exemplo n.º 5
0
        //Home Tab
        void PopulateRibbonHomeBars(CustomRibbonTab Tab)
        {
            CustomRibbonBar Bar1 = new CustomRibbonBar()
            {
                BarHeader = "Clipboard"
            };
            CustomRibbonBar Bar2 = new CustomRibbonBar()
            {
                BarHeader = "MDI Styles"
            };

            PopulateRibbonNewItems(Bar1);
            CustomRibbonBar Bar3 = new CustomRibbonBar()
            {
                BarHeader = "Editing"
            };
            CustomRibbonBar Bar4 = new CustomRibbonBar()
            {
                BarHeader = "Paragraph"
            };

            PopulateEditingItems(Bar3);
            PopulateParagraphItems(Bar4);
            CustomRibbonBar Bar5 = new CustomRibbonBar()
            {
                BarHeader = "Mail"
            };

            PopuplateRibbonMailItems(Bar5);
            CustomRibbonBar Bar6 = new CustomRibbonBar()
            {
                BarHeader = "Modal"
            };

            PopulateModalItems(Bar6);
            Tab.CustomRibbonBars.Add(Bar1);
            Tab.CustomRibbonBars.Add(Bar3);
            Tab.CustomRibbonBars.Add(Bar4);
            Tab.CustomRibbonBars.Add(Bar5);
            Tab.CustomRibbonBars.Add(Bar6);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Method which is used to populate child ribbon bars to Home ribbon bar.
        /// </summary>
        /// <param name="homeTab">Specifies the custom ribbon tab.</param>
        void PopulateRibbonHomeBars(CustomRibbonTab homeTab)
        {
            CustomRibbonBar clipBoardBar = new CustomRibbonBar()
            {
                BarHeader = "Clipboard"
            };
            CustomRibbonBar MDIBar = new CustomRibbonBar()
            {
                BarHeader = "MDI Styles"
            };
            CustomRibbonBar editingBar = new CustomRibbonBar()
            {
                BarHeader = "Editing"
            };
            CustomRibbonBar paragraphBar = new CustomRibbonBar()
            {
                BarHeader = "Paragraph"
            };
            CustomRibbonBar mailBar = new CustomRibbonBar()
            {
                BarHeader = "Mail"
            };
            CustomRibbonBar modalBar = new CustomRibbonBar()
            {
                BarHeader = "Modal"
            };

            PopulateRibbonNewItems(clipBoardBar);
            PopulateEditingItems(editingBar);
            PopulateParagraphItems(paragraphBar);
            PopuplateRibbonMailItems(mailBar);
            PopulateModalItems(modalBar);

            homeTab.CustomRibbonBars.Add(clipBoardBar);
            homeTab.CustomRibbonBars.Add(editingBar);
            homeTab.CustomRibbonBars.Add(paragraphBar);
            homeTab.CustomRibbonBars.Add(mailBar);
            homeTab.CustomRibbonBars.Add(modalBar);
        }
Exemplo n.º 7
0
        //Insert Tab
        void PopulateRibbonInsertBars(CustomRibbonTab Tab)
        {
            CustomRibbonBar Bar1 = new CustomRibbonBar()
            {
                BarHeader = "Table"
            };
            CustomRibbonBar Bar2 = new CustomRibbonBar()
            {
                BarHeader = "Illustrations"
            };
            CustomRibbonBar Bar3 = new CustomRibbonBar()
            {
                BarHeader = "Links"
            };

            PopulateRibbonTableItems(Bar1);
            PopulateRibbonIllustrationsItems(Bar2);
            PopulateRibbonLinkItems(Bar3);
            Tab.CustomRibbonBars.Add(Bar1);
            Tab.CustomRibbonBars.Add(Bar2);
            Tab.CustomRibbonBars.Add(Bar3);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Method which is used to populate items to insert the ribbon bars.
        /// </summary>
        /// <param name="Tab"></param>
        private void PopulateRibbonPrintPreviewBars(CustomRibbonTab Tab)
        {
            CustomRibbonBar Bar1 = new CustomRibbonBar()
            {
                BarHeader = "Print"
            };
            CustomRibbonBar Bar2 = new CustomRibbonBar()
            {
                BarHeader = "Zoom"
            };
            CustomRibbonBar Bar3 = new CustomRibbonBar()
            {
                BarHeader = "Preview"
            };

            PopulateRibbonPrintItems(Bar1);
            PopulateRibbonZoomItems(Bar2);
            PopulateRibbonPreviewItems(Bar3);

            Tab.CustomRibbonBars.Add(Bar1);
            Tab.CustomRibbonBars.Add(Bar2);
            Tab.CustomRibbonBars.Add(Bar3);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Method which is used to populate items to insert the ribbon bars.
        /// </summary>
        /// <param name="Tab">Specifies the custom ribbon tab.</param>
        private void PopulateRibbonPrintPreviewBars(CustomRibbonTab Tab)
        {
            CustomRibbonBar printBar = new CustomRibbonBar()
            {
                BarHeader = "Print"
            };
            CustomRibbonBar zoomBar = new CustomRibbonBar()
            {
                BarHeader = "Zoom"
            };
            CustomRibbonBar perviewBar = new CustomRibbonBar()
            {
                BarHeader = "Preview"
            };

            PopulateRibbonPrintItems(printBar);
            PopulateRibbonZoomItems(zoomBar);
            PopulateRibbonPreviewItems(perviewBar);

            Tab.CustomRibbonBars.Add(printBar);
            Tab.CustomRibbonBars.Add(zoomBar);
            Tab.CustomRibbonBars.Add(perviewBar);
        }
Exemplo n.º 10
0
        //Insert Tab
        /// <summary>
        /// Method which is used to populate items to insert ribbon bar.
        /// </summary>
        /// <param name="Tab">Specifies the custom ribbon tab.</param>
        void PopulateRibbonInsertBars(CustomRibbonTab Tab)
        {
            CustomRibbonBar tableBar = new CustomRibbonBar()
            {
                BarHeader = "Table"
            };
            CustomRibbonBar illustrationBar = new CustomRibbonBar()
            {
                BarHeader = "Illustrations"
            };
            CustomRibbonBar linksBar = new CustomRibbonBar()
            {
                BarHeader = "Links"
            };

            PopulateRibbonTableItems(tableBar);
            PopulateRibbonIllustrationsItems(illustrationBar);
            PopulateRibbonLinkItems(linksBar);

            Tab.CustomRibbonBars.Add(tableBar);
            Tab.CustomRibbonBars.Add(illustrationBar);
            Tab.CustomRibbonBars.Add(linksBar);
        }