Beispiel #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)
        {
            ModelRibbonTab.Clear();
            ModelRibbonTab printPreviewTab = new ModelRibbonTab()
            {
                TabHeader = "Print Preview"
            };

            PopulateRibbonPrintPreviewBars(printPreviewTab);
            ModelRibbonTab.Add(printPreviewTab);
        }
Beispiel #2
0
        /// <summary>
        /// Adding ribbon tabs to the main ribbon window.
        /// </summary>
        void PopulateRibbonTabs()
        {
            MenuMergingRibbonTab firstTab = new MenuMergingRibbonTab()
            {
                TabHeader = "Home"
            };
            MenuMergingRibbonTab secondTab = new MenuMergingRibbonTab()
            {
                TabHeader = "Insert"
            };

            PopulateRibbonHomeBars(firstTab);
            PopulateRibbonInsertBars(secondTab);
            ModelRibbonTab.Add(firstTab);
            ModelRibbonTab.Add(secondTab);
        }
Beispiel #3
0
        /// <summary>
        /// Method which is used to populate ribbon bar to ribbon tab.
        /// </summary>
        void PopulateRibbonTabs()
        {
            ModelRibbonTab homeTab = new ModelRibbonTab()
            {
                TabHeader = "Home"
            };
            ModelRibbonTab insertTab = new ModelRibbonTab()
            {
                TabHeader = "Insert"
            };

            PopulateRibbonHomeBars(homeTab);
            PopulateRibbonInsertBars(insertTab);
            ModelRibbonTab.Add(homeTab);
            ModelRibbonTab.Add(insertTab);
        }
Beispiel #4
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(ModelRibbonTab Tab)
        {
            ModelTabRibbonBar printBar = new ModelTabRibbonBar()
            {
                BarHeader = "Print"
            };
            ModelTabRibbonBar zoomBar = new ModelTabRibbonBar()
            {
                BarHeader = "Zoom"
            };
            ModelTabRibbonBar perviewBar = new ModelTabRibbonBar()
            {
                BarHeader = "Preview"
            };

            PopulateRibbonPrintItems(printBar);
            PopulateRibbonZoomItems(zoomBar);
            PopulateRibbonPreviewItems(perviewBar);
            Tab.ModelTabRibbonBar.Add(printBar);
            Tab.ModelTabRibbonBar.Add(zoomBar);
            Tab.ModelTabRibbonBar.Add(perviewBar);
        }
Beispiel #5
0
        /// <summary>
        /// Method which is used to populate items to insert ribbon bar.
        /// </summary>
        /// <param name="Tab">Specifies the custom ribbon tab.</param>
        void PopulateRibbonInsertBars(ModelRibbonTab Tab)
        {
            ModelTabRibbonBar tableBar = new ModelTabRibbonBar()
            {
                BarHeader = "Table"
            };
            ModelTabRibbonBar illustrationBar = new ModelTabRibbonBar()
            {
                BarHeader = "Illustrations"
            };
            ModelTabRibbonBar linksBar = new ModelTabRibbonBar()
            {
                BarHeader = "Links"
            };

            PopulateRibbonTableItems(tableBar);
            PopulateRibbonIllustrationsItems(illustrationBar);
            PopulateRibbonLinkItems(linksBar);
            Tab.ModelTabRibbonBar.Add(tableBar);
            Tab.ModelTabRibbonBar.Add(illustrationBar);
            Tab.ModelTabRibbonBar.Add(linksBar);
        }
Beispiel #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(ModelRibbonTab homeTab)
        {
            ModelTabRibbonBar clipBoardBar = new ModelTabRibbonBar()
            {
                BarHeader = "Clipboard"
            };
            ModelTabRibbonBar MDIBar = new ModelTabRibbonBar()
            {
                BarHeader = "MDI Styles"
            };
            ModelTabRibbonBar editingBar = new ModelTabRibbonBar()
            {
                BarHeader = "Editing"
            };
            ModelTabRibbonBar paragraphBar = new ModelTabRibbonBar()
            {
                BarHeader = "Create"
            };
            ModelTabRibbonBar mailBar = new ModelTabRibbonBar()
            {
                BarHeader = "Mail"
            };
            ModelTabRibbonBar modalBar = new ModelTabRibbonBar()
            {
                BarHeader = "Modal"
            };

            PopulateRibbonNewItems(clipBoardBar);
            PopulateEditingItems(editingBar);
            PopulateCreateBarItems(paragraphBar);
            PopuplateRibbonMailItems(mailBar);
            PopulateModalItems(modalBar);
            homeTab.ModelTabRibbonBar.Add(clipBoardBar);
            homeTab.ModelTabRibbonBar.Add(editingBar);
            homeTab.ModelTabRibbonBar.Add(paragraphBar);
            homeTab.ModelTabRibbonBar.Add(mailBar);
            homeTab.ModelTabRibbonBar.Add(modalBar);
        }
Beispiel #7
0
 /// <summary>
 /// Method which is used to implement the closeModelTab command.
 /// </summary>
 /// <param name="parameter">Model tab to be show and close.</param>
 public void ExecuteCloseModelTabCommand(object parameter)
 {
     ModelRibbonTab.Clear();
     PopulateRibbonTabs();
 }