Inheritance: System.Windows.Controls.Primitives.ToggleButton, IToggleButton, IRibbonControl, IQuickAccessItemProvider
        // Remove from group
        static void RemoveFromGroup(string groupName, ToggleButton button)
        {
            List<WeakReference> buttons = null;
            if (!groupedButtons.TryGetValue(groupName, out buttons)) return;

            buttons.RemoveAt(buttons.FindIndex(x=>(x.IsAlive && ((ToggleButton)x.Target) == button)));
        }
        // Remove from group
        static void AddToGroup(string groupName, ToggleButton button)
        {
            List<WeakReference> buttons = null;
            if (!groupedButtons.TryGetValue(groupName, out buttons))
            {
                buttons = new List<WeakReference>();
                groupedButtons.Add(groupName, buttons);
            }

            buttons.Add(new WeakReference(button));
        }
        /// <summary>
        /// 初始化样式
        /// </summary>
        private void InisteStyle()
        {
            BLL.FileManager.GetStyleList();//获取样式列表

            ImageSource iconBursh = new BitmapImage(new Uri("pack://application:,,,/Images/stylechange32.png", UriKind.RelativeOrAbsolute));

            //加载样式
            gropStyleList.Items.Clear();
            foreach (var i in Config.StyleList)
            {
                var toggleBtn = new ToggleButton()
                {
                    GroupName = "groupStyle",
                    Tag = i.Value,
                    SizeDefinition = new RibbonControlSizeDefinition("Large"),
                    Header = i.Key,
                    LargeIcon = iconBursh,
                };
                toggleBtn.Click += StyleChange_Click;
                gropStyleList.Items.Add(toggleBtn);
            }

            ChangeStyle(Config.Common.StyleName);
            //设置样式
        }
        /// <summary>
        /// Create ribbon menus.
        /// </summary>
        /// <param name="ribbonMenu"></param>
        public override void CreateRibbonMenu(Ribbon ribbonMenu)
        {
            base.CreateRibbonMenu(ribbonMenu);

            // in case the tab group is used for multiple vms, prevent multiple tabs beeing created
            foreach (Fluent.RibbonContextualTabGroup t in ribbonMenu.ContextualGroups)
            {
                if (t.Name == "tabGroupExamplePlugin")
                {
                    exampleTabGroup = t;
                    return;
                }
            }

            // contextual tab, which should only be visible when the example diagram surface is active
            exampleTabGroup             = new RibbonContextualTabGroup();
            exampleTabGroup.Header      = "Example Tab Group";
            exampleTabGroup.BorderBrush = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Background  = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Name        = "tabGroupExamplePlugin";

            // create ribbon bar and associate it with the contextual group
            RibbonTabItem exampleTab = new RibbonTabItem();

            exampleTab.Header = "Example View Operations";
            exampleTab.Group  = exampleTabGroup;

            // Analyze group
            RibbonGroupBox analyzeGroup = new RibbonGroupBox();

            analyzeGroup.Header = "Analyze";
            exampleTab.Groups.Add(analyzeGroup);

            Fluent.Button buttonAnalyze = new Fluent.Button();
            buttonAnalyze.Text      = "Analyze";
            buttonAnalyze.Command   = this.command;
            buttonAnalyze.Size      = RibbonControlSize.Large;
            buttonAnalyze.LargeIcon = GetImage("prepare_32.png");
            analyzeGroup.Items.Add(buttonAnalyze);

            // View group
            RibbonGroupBox viewGroup = new RibbonGroupBox();

            viewGroup.Header = "View";
            exampleTab.Groups.Add(viewGroup);

            Fluent.ToggleButton buttonTree = new Fluent.ToggleButton();
            buttonTree.Text      = "Tree";
            buttonTree.LargeIcon = GetImage("tree-32.png");
            viewGroup.Items.Add(buttonTree);

            Fluent.ToggleButton buttonTable = new Fluent.ToggleButton();
            buttonTable.Text      = "Table";
            buttonTable.LargeIcon = GetImage("table-32.png");
            viewGroup.Items.Add(buttonTable);

            // Export group
            RibbonGroupBox exportGroup = new RibbonGroupBox();

            exportGroup.Header = "Export";
            exampleTab.Groups.Add(exportGroup);

            Fluent.Button buttonExportCSV = new Fluent.Button();
            buttonExportCSV.Text      = "Export as CSV-File";
            buttonExportCSV.Size      = RibbonControlSize.Large;
            buttonExportCSV.LargeIcon = GetImage("csv_32x32.png");
            buttonExportCSV.Command   = this.command;
            exportGroup.Items.Add(buttonExportCSV);

            Fluent.Button buttonExportHTML = new Fluent.Button();
            buttonExportHTML.Text      = "Export as HTML Website";
            buttonExportHTML.Size      = RibbonControlSize.Large;
            buttonExportHTML.LargeIcon = GetImage("html_32x32.png");
            buttonExportHTML.Command   = this.command;
            exportGroup.Items.Add(buttonExportHTML);

            Fluent.Button buttonExportPDF = new Fluent.Button();
            buttonExportPDF.Text      = "Export as PDF Document";
            buttonExportPDF.Size      = RibbonControlSize.Large;
            buttonExportPDF.LargeIcon = GetImage("pdf_32x32.png");
            buttonExportPDF.Command   = this.command;
            exportGroup.Items.Add(buttonExportPDF);

            ribbonMenu.ContextualGroups.Add(exampleTabGroup);
            ribbonMenu.Tabs.Add(exampleTab);
        }
        /// <summary>
        /// Create ribbon menus.
        /// </summary>
        /// <param name="ribbonMenu"></param>
        public override void CreateRibbonMenu(Ribbon ribbonMenu)
        {
            base.CreateRibbonMenu(ribbonMenu);

            // in case the tab group is used for multiple vms, prevent multiple tabs beeing created
            foreach (Fluent.RibbonContextualTabGroup t in ribbonMenu.ContextualGroups)
                if (t.Name == "tabGroupExamplePlugin")
                {
                    exampleTabGroup = t;
                    return;
                }

            // contextual tab, which should only be visible when the example diagram surface is active
            exampleTabGroup = new RibbonContextualTabGroup();
            exampleTabGroup.Header = "Example Tab Group";
            exampleTabGroup.BorderBrush = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Background = new SolidColorBrush(System.Windows.Media.Colors.LightBlue);
            exampleTabGroup.Name = "tabGroupExamplePlugin";

            // create ribbon bar and associate it with the contextual group
            RibbonTabItem exampleTab = new RibbonTabItem();
            exampleTab.Header = "Example View Operations";
            exampleTab.Group = exampleTabGroup;

            // Analyze group
            RibbonGroupBox analyzeGroup = new RibbonGroupBox();
            analyzeGroup.Header = "Analyze";
            exampleTab.Groups.Add(analyzeGroup);

            Fluent.Button buttonAnalyze = new Fluent.Button();
            buttonAnalyze.Text = "Analyze";
            buttonAnalyze.Command = this.command;
            buttonAnalyze.Size = RibbonControlSize.Large;
            buttonAnalyze.LargeIcon = GetImage("prepare_32.png");
            analyzeGroup.Items.Add(buttonAnalyze);

            // View group
            RibbonGroupBox viewGroup = new RibbonGroupBox();
            viewGroup.Header = "View";
            exampleTab.Groups.Add(viewGroup);

            Fluent.ToggleButton buttonTree = new Fluent.ToggleButton();
            buttonTree.Text = "Tree";
            buttonTree.LargeIcon = GetImage("tree-32.png");
            viewGroup.Items.Add(buttonTree);

            Fluent.ToggleButton buttonTable = new Fluent.ToggleButton();
            buttonTable.Text = "Table";
            buttonTable.LargeIcon = GetImage("table-32.png");
            viewGroup.Items.Add(buttonTable);

            // Export group
            RibbonGroupBox exportGroup = new RibbonGroupBox();
            exportGroup.Header = "Export";
            exampleTab.Groups.Add(exportGroup);

            Fluent.Button buttonExportCSV = new Fluent.Button();
            buttonExportCSV.Text = "Export as CSV-File";
            buttonExportCSV.Size = RibbonControlSize.Large;
            buttonExportCSV.LargeIcon = GetImage("csv_32x32.png");
            buttonExportCSV.Command = this.command;
            exportGroup.Items.Add(buttonExportCSV);

            Fluent.Button buttonExportHTML = new Fluent.Button();
            buttonExportHTML.Text = "Export as HTML Website";
            buttonExportHTML.Size = RibbonControlSize.Large;
            buttonExportHTML.LargeIcon = GetImage("html_32x32.png");
            buttonExportHTML.Command = this.command;
            exportGroup.Items.Add(buttonExportHTML);

            Fluent.Button buttonExportPDF = new Fluent.Button();
            buttonExportPDF.Text = "Export as PDF Document";
            buttonExportPDF.Size = RibbonControlSize.Large;
            buttonExportPDF.LargeIcon = GetImage("pdf_32x32.png");
            buttonExportPDF.Command = this.command;
            exportGroup.Items.Add(buttonExportPDF);

            ribbonMenu.ContextualGroups.Add(exampleTabGroup);
            ribbonMenu.Tabs.Add(exampleTab);
        }
        /// <summary>
        /// Gets control which represents shortcut item.
        /// This item MUST be syncronized with the original 
        /// and send command to original one control.
        /// </summary>
        /// <returns>Control which represents shortcut item</returns>
        public virtual FrameworkElement CreateQuickAccessItem()
        {
            ToggleButton button = new ToggleButton();

            RibbonControl.Bind(this, button, "IsChecked", IsCheckedProperty, BindingMode.TwoWay);
            button.Click += ((sender, e) => this.RaiseEvent(e));
            RibbonControl.BindQuickAccessItem(this, button);

            return button;
        }
Exemple #7
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.fmMain = ((LEDX.MWin)(target));
     return;
     case 2:
     this.ribbon = ((Fluent.Ribbon)(target));
     
     #line 57 "..\..\MainWindow.xaml"
     this.ribbon.SelectedTabChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Ribbon_SelectedTabChanged);
     
     #line default
     #line hidden
     return;
     case 3:
     this.btNewProj = ((Fluent.Button)(target));
     return;
     case 4:
     this.btOpenProj = ((Fluent.Button)(target));
     return;
     case 5:
     this.btSaveProj = ((Fluent.Button)(target));
     return;
     case 6:
     this.tbEdit = ((Fluent.RibbonTabItem)(target));
     return;
     case 7:
     this.btUndo = ((Fluent.SplitButton)(target));
     return;
     case 8:
     this.btPasteFram = ((Fluent.SplitButton)(target));
     return;
     case 9:
     this.rgbContrProp = ((Fluent.RibbonGroupBox)(target));
     return;
     case 10:
     this.spAddNew = ((Fluent.SplitButton)(target));
     return;
     case 11:
     this.btDel = ((Fluent.MenuItem)(target));
     return;
     case 12:
     this.tbConName = ((Fluent.TextBox)(target));
     return;
     case 13:
     this.tbConNumb = ((Fluent.Spinner)(target));
     return;
     case 14:
     this.tbConButt = ((Fluent.Spinner)(target));
     return;
     case 15:
     this.rgbFrameProp = ((Fluent.RibbonGroupBox)(target));
     return;
     case 16:
     this.spTime = ((Fluent.Spinner)(target));
     return;
     case 17:
     this.btCopyFram = ((Fluent.Button)(target));
     return;
     case 18:
     this.btCutFram = ((Fluent.Button)(target));
     return;
     case 19:
     this.btDelFram = ((Fluent.Button)(target));
     return;
     case 20:
     this.btToSample = ((Fluent.Button)(target));
     return;
     case 21:
     this.spbtFSet = ((Fluent.SplitButton)(target));
     
     #line 179 "..\..\MainWindow.xaml"
     this.spbtFSet.DropDownClosed += new System.EventHandler(this.SpbtFSet_DropDownClosed);
     
     #line default
     #line hidden
     return;
     case 22:
     this.rgbColorProp = ((Fluent.RibbonGroupBox)(target));
     return;
     case 23:
     this.btBegColor = ((Fluent.Button)(target));
     return;
     case 24:
     this.rctBegClolor = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 25:
     this.btCopyColor = ((Fluent.Button)(target));
     return;
     case 26:
     this.btGetColor = ((Fluent.Button)(target));
     return;
     case 27:
     this.btEndColor = ((Fluent.Button)(target));
     return;
     case 28:
     this.rctEndClolor = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 29:
     this.btCopy = ((Fluent.Button)(target));
     return;
     case 30:
     this.grSampl = ((Fluent.InRibbonGallery)(target));
     return;
     case 31:
     this.tbPalyer = ((Fluent.RibbonTabItem)(target));
     return;
     case 32:
     this.rgbPropLayer = ((Fluent.RibbonGroupBox)(target));
     return;
     case 33:
     this.btLayerDown = ((Fluent.Button)(target));
     return;
     case 34:
     this.btLayerTop = ((Fluent.Button)(target));
     return;
     case 35:
     this.btDelLay = ((Fluent.Button)(target));
     return;
     case 36:
     this.rgbPropPng = ((Fluent.RibbonGroupBox)(target));
     return;
     case 37:
     this.cbController = ((Fluent.ComboBox)(target));
     return;
     case 38:
     this.lgWidth = ((Fluent.TextBox)(target));
     return;
     case 39:
     this.lgHeight = ((Fluent.TextBox)(target));
     return;
     case 40:
     this.rgbPropText = ((Fluent.RibbonGroupBox)(target));
     return;
     case 41:
     this.lbtemTest = ((System.Windows.Controls.Label)(target));
     return;
     case 42:
     this.temTest = ((LEDX.Components.MultiLineTextEditor)(target));
     return;
     case 43:
     this.spTextSize = ((Fluent.Spinner)(target));
     return;
     case 44:
     this.cbFontFamaly = ((Fluent.ComboBox)(target));
     return;
     case 45:
     this.rctTextClolor = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 46:
     this.tbFlash = ((Fluent.RibbonTabItem)(target));
     return;
     case 47:
     this.lbPort = ((System.Windows.Controls.Label)(target));
     return;
     case 48:
     this.cbComName = ((Fluent.ComboBox)(target));
     return;
     case 49:
     this.lbSpeed = ((System.Windows.Controls.Label)(target));
     return;
     case 50:
     this.cbComRate = ((Fluent.ComboBox)(target));
     return;
     case 51:
     this.btRefrPorts = ((Fluent.Button)(target));
     return;
     case 52:
     this.tbSync = ((Fluent.ToggleButton)(target));
     return;
     case 53:
     this.tgbShowLog = ((Fluent.ToggleButton)(target));
     return;
     case 54:
     this.spProgress = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 55:
     this.uiScaleSlider = ((System.Windows.Controls.Slider)(target));
     
     #line 531 "..\..\MainWindow.xaml"
     this.uiScaleSlider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.uiScaleSlider_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 56:
     this.uiMan = ((LEDX.Components.PlayScale)(target));
     return;
     case 57:
     this.svSearch = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 58:
     this.sldTime = ((LEDX.Components.TimeSlider)(target));
     
     #line 561 "..\..\MainWindow.xaml"
     this.sldTime.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.sld_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 59:
     this.scroll = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 60:
     this.icContr = ((System.Windows.Controls.ItemsControl)(target));
     return;
     case 61:
     this.svTracks = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 62:
     this.icTrack = ((System.Windows.Controls.ItemsControl)(target));
     return;
     case 63:
     this.iCanv = ((LEDX.Components.IncRender)(target));
     
     #line 598 "..\..\MainWindow.xaml"
     this.iCanv.SelectionChanged += new System.EventHandler(this.iCanv_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 64:
     this.mainScroller = ((System.Windows.Controls.ScrollViewer)(target));
     
     #line 607 "..\..\MainWindow.xaml"
     this.mainScroller.ScrollChanged += new System.Windows.Controls.ScrollChangedEventHandler(this.mainScroller_ScrollChanged);
     
     #line default
     #line hidden
     return;
     case 65:
     this.svLog = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 66:
     this.tbLog = ((System.Windows.Controls.TextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
 /// <summary>
 /// Gets control which represents shortcut item.
 /// This item MUST be syncronized with the original 
 /// and send command to original one control.
 /// </summary>
 /// <returns>Control which represents shortcut item</returns>
 public override FrameworkElement CreateQuickAccessItem()
 {
     ToggleButton button = new ToggleButton();
     BindQuickAccessItem(button);
     return button;
 }
Exemple #9
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TestContentControl = ((FluentTest.TestContent)(target));
                return;

            case 3:
                this.ribbon = ((Fluent.Ribbon)(target));
                return;

            case 4:
                this.tabGroup1 = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 5:
                this.tabGroup2 = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 6:
                this.invisibleTabGroup = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 7:
                this.startScreen = ((Fluent.StartScreen)(target));
                return;

            case 8:

            #line 155 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.HandleSaveAsClick);

            #line default
            #line hidden
                return;

            case 9:

            #line 255 "TestContent.xaml"
                ((Fluent.Spinner)(target)).ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.OnSpinnerValueChanged);

            #line default
            #line hidden
                return;

            case 10:

            #line 284 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnHelpClick);

            #line default
            #line hidden
                return;

            case 11:
                this.Clipboard = ((Fluent.RibbonGroupBox)(target));

            #line 328 "TestContent.xaml"
                this.Clipboard.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 12:
                this.saveButton = ((Fluent.Button)(target));

            #line 337 "TestContent.xaml"
                this.saveButton.Click += new System.Windows.RoutedEventHandler(this.OnSaveButtonClick);

            #line default
            #line hidden
                return;

            case 13:
                this.buttonWatermark = ((Fluent.DropDownButton)(target));
                return;

            case 14:
                this.WatermarkGallery = ((Fluent.Gallery)(target));
                return;

            case 15:

            #line 360 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Suit_Button_Click);

            #line default
            #line hidden
                return;

            case 16:

            #line 374 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Sequence_Button_Click);

            #line default
            #line hidden
                return;

            case 17:

            #line 389 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Step_Button_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.addChildren = ((Fluent.DropDownButton)(target));
                return;

            case 19:
                this.ChildrenGallery = ((Fluent.Gallery)(target));
                return;

            case 20:

            #line 422 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_App_Button_Click);

            #line default
            #line hidden
                return;

            case 21:

            #line 434 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_DataSource_Button_Click);

            #line default
            #line hidden
                return;

            case 22:

            #line 447 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Variable_Button_Click);

            #line default
            #line hidden
                return;

            case 23:

            #line 460 "TestContent.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.New_Variable_Button_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.cutButton = ((Fluent.Button)(target));
                return;

            case 25:
                this.copyButton = ((Fluent.Button)(target));
                return;

            case 26:
                this.pasteButton = ((Fluent.Button)(target));

            #line 508 "TestContent.xaml"
                this.pasteButton.Click += new System.Windows.RoutedEventHandler(this.OnFormatPainterClick);

            #line default
            #line hidden
                return;

            case 27:
                this.FunctionsGalleryGroup = ((Fluent.RibbonGroupBox)(target));
                return;

            case 28:
                this.galleryFunctionsInRibbonGallery = ((Fluent.InRibbonGallery)(target));
                return;

            case 29:
                this.functionsFilterAll = ((Fluent.GalleryGroupFilter)(target));
                return;

            case 30:
                this.Font = ((Fluent.RibbonGroupBox)(target));

            #line 537 "TestContent.xaml"
                this.Font.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 31:
                this.comboBoxFontName = ((Fluent.ComboBox)(target));
                return;

            case 32:
                this.segoeFont = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 33:
                this.comboBoxFontSize = ((Fluent.ComboBox)(target));
                return;

            case 34:
                this.buttonGrowFont = ((Fluent.Button)(target));
                return;

            case 35:
                this.buttonShrinkFont = ((Fluent.Button)(target));
                return;

            case 36:
                this.buttonChangeCase = ((Fluent.DropDownButton)(target));
                return;

            case 37:
                this.buttonClearFormatting = ((Fluent.Button)(target));
                return;

            case 38:
                this.buttonBold = ((Fluent.ToggleButton)(target));
                return;

            case 39:
                this.buttonItalic = ((Fluent.ToggleButton)(target));
                return;

            case 40:
                this.buttonUnderline = ((Fluent.DropDownButton)(target));
                return;

            case 41:
                this.buttonStrikethrough = ((Fluent.Button)(target));
                return;

            case 42:
                this.buttonSubscript = ((Fluent.Button)(target));
                return;

            case 43:
                this.buttonSuperscript = ((Fluent.Button)(target));
                return;

            case 44:
                this.buttonTextEffects = ((Fluent.DropDownButton)(target));
                return;

            case 45:
                this.buttonTextHighlightColor = ((Fluent.DropDownButton)(target));
                return;

            case 46:
                this.buttonFontColor = ((Fluent.DropDownButton)(target));
                return;

            case 47:
                this.Group = ((Fluent.RibbonGroupBox)(target));
                return;

            case 48:
                this.spinner = ((Fluent.Spinner)(target));
                return;

            case 49:
                this.buttonGreen = ((Fluent.Button)(target));
                return;

            case 50:
                this.buttonGray = ((Fluent.Button)(target));
                return;

            case 51:
                this.buttonYellow = ((Fluent.Button)(target));
                return;

            case 52:
                this.buttonBrown = ((Fluent.Button)(target));
                return;

            case 53:
                this.B = ((Fluent.RibbonGroupBox)(target));

            #line 889 "TestContent.xaml"
                this.B.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 54:
                this.groupLL = ((Fluent.RibbonGroupBox)(target));
                return;

            case 55:

            #line 951 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.HandleAddItemToFontsClick);

            #line default
            #line hidden
                return;

            case 56:
                this.InRibbonGallery = ((Fluent.InRibbonGallery)(target));
                return;

            case 57:

            #line 1383 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnEnlargeClick);

            #line default
            #line hidden
                return;

            case 58:

            #line 1388 "TestContent.xaml"
                ((Fluent.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnReduceClick);

            #line default
            #line hidden
                return;

            case 59:
                this.UndoButton = ((Fluent.SplitButton)(target));
                return;

            case 60:
                this.ShowDetailButton = ((Fluent.ToggleButton)(target));
                return;

            case 61:
                this.ShowMoreButton = ((Fluent.ToggleButton)(target));
                return;

            case 62:
                this.FirstGalleryGroup = ((Fluent.RibbonGroupBox)(target));
                return;

            case 63:
                this.dropDownGreen = ((Fluent.DropDownButton)(target));
                return;

            case 64:
                this.SecondGalleryGroup = ((Fluent.RibbonGroupBox)(target));
                return;

            case 65:
                this.gallerySampleInRibbonGallery = ((Fluent.InRibbonGallery)(target));
                return;

            case 66:
                this.galleryFilterAll = ((Fluent.GalleryGroupFilter)(target));
                return;

            case 67:
                this.A = ((Fluent.RibbonGroupBox)(target));

            #line 1798 "TestContent.xaml"
                this.A.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 68:
                this.GalleryFilterAll = ((Fluent.GalleryGroupFilter)(target));
                return;

            case 69:

            #line 1850 "TestContent.xaml"
                ((Fluent.SplitButton)(target)).Click += new System.Windows.RoutedEventHandler(this.OnSplitClick);

            #line default
            #line hidden
                return;

            case 70:
                this.Default = ((Fluent.RibbonGroupBox)(target));
                return;

            case 71:
                this.Large = ((Fluent.RibbonGroupBox)(target));
                return;

            case 72:
                this.Other = ((Fluent.RibbonGroupBox)(target));
                return;

            case 73:
                this.ZC = ((Fluent.RibbonGroupBox)(target));
                return;

            case 74:
                this.xxx = ((Fluent.RibbonGroupBox)(target));

            #line 2317 "TestContent.xaml"
                this.xxx.LauncherClick += new System.Windows.RoutedEventHandler(this.OnLauncherButtonClick);

            #line default
            #line hidden
                return;

            case 75:
                this.zoomSlider = ((System.Windows.Controls.Slider)(target));

            #line 2628 "TestContent.xaml"
                this.zoomSlider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.ZoomSlider_OnValueChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 13 "..\..\..\MainWindow.xaml"
                ((Inter_face.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.RibbonWindow_Loaded);

            #line default
            #line hidden
                return;

            case 2:

            #line 53 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.Image)(target)).ImageFailed += new System.EventHandler <System.Windows.ExceptionRoutedEventArgs>(this.Image_ImageFailed);

            #line default
            #line hidden
                return;

            case 3:
                this.ClosedEventToCommand = ((GalaSoft.MvvmLight.Command.EventToCommand)(target));
                return;

            case 4:
                this.CreatNewWork = ((Fluent.Button)(target));

            #line 315 "..\..\..\MainWindow.xaml"
                this.CreatNewWork.Click += new System.Windows.RoutedEventHandler(this.CreatNewWork_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.loadformdatabase = ((Fluent.Button)(target));

            #line 316 "..\..\..\MainWindow.xaml"
                this.loadformdatabase.Click += new System.Windows.RoutedEventHandler(this.loadformdatabase_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.loadformSourceZip = ((Fluent.Button)(target));

            #line 317 "..\..\..\MainWindow.xaml"
                this.loadformSourceZip.Click += new System.Windows.RoutedEventHandler(this.loadformSourceZip_Click);

            #line default
            #line hidden

            #line 317 "..\..\..\MainWindow.xaml"
                this.loadformSourceZip.DragEnter += new System.Windows.DragEventHandler(this.loadformSourceZip_DragEnter);

            #line default
            #line hidden

            #line 317 "..\..\..\MainWindow.xaml"
                this.loadformSourceZip.Drop += new System.Windows.DragEventHandler(this.loadformSourceZip_Drop);

            #line default
            #line hidden
                return;

            case 7:
                this.loadformOpZip = ((Fluent.Button)(target));

            #line 318 "..\..\..\MainWindow.xaml"
                this.loadformOpZip.Click += new System.Windows.RoutedEventHandler(this.loadformOpZip_Click);

            #line default
            #line hidden

            #line 318 "..\..\..\MainWindow.xaml"
                this.loadformOpZip.DragEnter += new System.Windows.DragEventHandler(this.loadformOpZip_DragEnter);

            #line default
            #line hidden

            #line 318 "..\..\..\MainWindow.xaml"
                this.loadformOpZip.Drop += new System.Windows.DragEventHandler(this.loadformOpZip_Drop);

            #line default
            #line hidden
                return;

            case 8:
                this.SaveSourcedata = ((Fluent.Button)(target));

            #line 321 "..\..\..\MainWindow.xaml"
                this.SaveSourcedata.Click += new System.Windows.RoutedEventHandler(this.SaveSourcedata_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.SaveOpdata = ((Fluent.Button)(target));

            #line 322 "..\..\..\MainWindow.xaml"
                this.SaveOpdata.Click += new System.Windows.RoutedEventHandler(this.SaveOpdata_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.ExportToSvg = ((Fluent.Button)(target));
                return;

            case 11:
                this.ClickEventToCommand = ((GalaSoft.MvvmLight.Command.EventToCommand)(target));
                return;

            case 12:
                this.openpdfile = ((Fluent.Button)(target));

            #line 335 "..\..\..\MainWindow.xaml"
                this.openpdfile.Click += new System.Windows.RoutedEventHandler(this.openpdfile_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.openqxfile = ((Fluent.Button)(target));

            #line 336 "..\..\..\MainWindow.xaml"
                this.openqxfile.Click += new System.Windows.RoutedEventHandler(this.openqxfile_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.openbjfile = ((Fluent.Button)(target));

            #line 337 "..\..\..\MainWindow.xaml"
                this.openbjfile.Click += new System.Windows.RoutedEventHandler(this.openbjfile_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.modifycdldata = ((Fluent.Button)(target));
                return;

            case 16:
                this.autofitcdldata = ((Fluent.Button)(target));
                return;

            case 17:
                this.showcdldata = ((Fluent.ToggleButton)(target));
                return;

            case 18:
                this.checkdatasign = ((Fluent.Button)(target));

            #line 345 "..\..\..\MainWindow.xaml"
                this.checkdatasign.Click += new System.Windows.RoutedEventHandler(this.checkdatasign_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.checklogic = ((Fluent.Button)(target));

            #line 346 "..\..\..\MainWindow.xaml"
                this.checklogic.Click += new System.Windows.RoutedEventHandler(this.checklogic_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.opentemppdfile = ((Fluent.Button)(target));

            #line 349 "..\..\..\MainWindow.xaml"
                this.opentemppdfile.Click += new System.Windows.RoutedEventHandler(this.opentemppdfile_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.opentempqxfile = ((Fluent.Button)(target));

            #line 350 "..\..\..\MainWindow.xaml"
                this.opentempqxfile.Click += new System.Windows.RoutedEventHandler(this.opentempqxfile_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.opentempbjfile = ((Fluent.Button)(target));

            #line 351 "..\..\..\MainWindow.xaml"
                this.opentempbjfile.Click += new System.Windows.RoutedEventHandler(this.opentempbjfile_Click);

            #line default
            #line hidden
                return;

            case 23:
                this.changeS = ((Fluent.Button)(target));

            #line 356 "..\..\..\MainWindow.xaml"
                this.changeS.Click += new System.Windows.RoutedEventHandler(this.changeS_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.changeX = ((Fluent.Button)(target));

            #line 357 "..\..\..\MainWindow.xaml"
                this.changeX.Click += new System.Windows.RoutedEventHandler(this.changeX_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.changeSX = ((Fluent.Button)(target));

            #line 358 "..\..\..\MainWindow.xaml"
                this.changeSX.Click += new System.Windows.RoutedEventHandler(this.changeSX_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.changemerge = ((Fluent.Button)(target));

            #line 361 "..\..\..\MainWindow.xaml"
                this.changemerge.Click += new System.Windows.RoutedEventHandler(this.changemerge_Click);

            #line default
            #line hidden
                return;

            case 27:
                this.exportoto = ((Fluent.Button)(target));
                return;

            case 28:
                this.ShowDataRibbonTabItem = ((Fluent.RibbonTabItem)(target));
                return;

            case 29:
                this.LineDataRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 30:
                this.LoadPDToggleButton = ((Fluent.ToggleButton)(target));
                return;

            case 31:
                this.LoadQXToggleButton = ((Fluent.ToggleButton)(target));
                return;

            case 32:
                this.LoadCZToggleButton = ((Fluent.ToggleButton)(target));
                return;

            case 33:
                this.PositionToggleButton = ((Fluent.ToggleButton)(target));
                return;

            case 34:
                this.SingleRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 35:
                this.loadxhdataButton = ((Fluent.ToggleButton)(target));
                return;

            case 36:
                this.loadxhsdatabutton = ((Fluent.ToggleButton)(target));
                return;

            case 37:
                this.ModifyStationsignalButton = ((Fluent.Button)(target));
                return;

            case 38:
                this.signalDataRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 39:
                this.creatnewsignalButton = ((Fluent.Button)(target));
                return;

            case 40:
                this.opensignalButton = ((Fluent.Button)(target));
                return;

            case 41:
                this.SaveStationsignalButton = ((Fluent.Button)(target));
                return;

            case 42:
                this.SaveothersignalButton = ((Fluent.Button)(target));
                return;

            case 43:
                this.exportSplitButton = ((Fluent.SplitButton)(target));
                return;

            case 44:
                this.CheckDataRibbonTabItem = ((Fluent.RibbonTabItem)(target));
                return;

            case 45:
                this.MuRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 46:
                this.BulitTrainbutton = ((Fluent.Button)(target));
                return;

            case 47:
                this.CheckUmDisbutton = ((Fluent.Button)(target));
                return;

            case 48:
                this.ModifyXinhaoRibbonTabItem = ((Fluent.RibbonTabItem)(target));
                return;

            case 49:
                this.DetailRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 50:
                this.LiChenTextBox = ((Fluent.TextBox)(target));
                return;

            case 51:
                this.LxTextBox = ((Fluent.TextBox)(target));
                return;

            case 52:
                this.BhTextBox = ((Fluent.TextBox)(target));
                return;

            case 53:
                this.ModifyRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 54:
                this.distenceSpinner = ((Fluent.Spinner)(target));
                return;

            case 55:
                this.CommitButton = ((Fluent.Button)(target));
                return;

            case 56:
                this.ModifySignalButton = ((Fluent.Button)(target));
                return;

            case 57:
                this.DeleteSignalButton = ((Fluent.Button)(target));
                return;

            case 58:
                this.ModifyQjRibbonTabItem = ((Fluent.RibbonTabItem)(target));
                return;

            case 59:
                this.QjInfoRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 60:
                this.QidianTextBox = ((Fluent.TextBox)(target));
                return;

            case 61:
                this.LengthTextBox = ((Fluent.TextBox)(target));
                return;

            case 62:
                this.ModifyQjRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 63:
                this.PartLengthTextBox = ((Fluent.TextBox)(target));
                return;

            case 64:
                this.DivSpinner = ((Fluent.Spinner)(target));
                return;

            case 65:
                this.DivButton = ((Fluent.Button)(target));
                return;

            case 66:
                this.InsertButton = ((Fluent.Button)(target));
                return;

            case 67:
                this.InsertDFXButton = ((Fluent.Button)(target));
                return;

            case 68:
                this.ModifyDfxRibbonTabItem = ((Fluent.RibbonTabItem)(target));
                return;

            case 69:
                this.DfxInfoRibbonGroupBox = ((Fluent.RibbonGroupBox)(target));
                return;

            case 70:
                this.ModifyDianfxButton = ((Fluent.Button)(target));
                return;

            case 71:
                this.DeleteDianfxButton = ((Fluent.Button)(target));
                return;

            case 72:
                this.QujianRibbonContextualTabGroup = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 73:
                this.XinhaoContextualTabGroup = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 74:
                this.DianFxContextualTabGroup = ((Fluent.RibbonContextualTabGroup)(target));
                return;

            case 75:
                this.infoboxpanel = ((System.Windows.Controls.WrapPanel)(target));
                return;

            case 76:
                this.DataLlistBox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 77:
                this.statugrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 78:
                this.ProcessLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 79:
                this.ProgressBar = ((System.Windows.Controls.ProgressBar)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemple #11
0
            /// <summary>
            /// Creates the ribbon menu bar for the html editor.
            /// </summary>
            /// <param name="ribbonMenu">Main ribbon menu.</param>
            public override void CreateRibbonMenuBar(Fluent.Ribbon ribbonMenu)
            {
                foreach (RibbonContextualTabGroup t in ribbonMenu.ContextualGroups)
                {
                    if (t.Name == "tabGroupHtml")
                    {
                        return;
                    }
                }

                // add contextual items for the html editor
                RibbonContextualTabGroup contextualTG = new RibbonContextualTabGroup();

                contextualTG.Name        = "tabGroupHtml";
                contextualTG.BorderBrush = new SolidColorBrush(Colors.Orange);
                contextualTG.Background  = new SolidColorBrush(Colors.OrangeRed);
                contextualTG.Header      = "Html-Editor";

                Binding visibilityBinding = new Binding("ActiveViewModel.SelectedEditorViewModel.IsHtmlEditorViewModelVisible");

                visibilityBinding.Converter = new BooleanToVisibilityConverter();
                visibilityBinding.Mode      = BindingMode.OneWay;
                contextualTG.SetBinding(RibbonContextualTabGroup.VisibilityProperty, visibilityBinding);

                // add the html editor tab item
                RibbonTabItem tab = new RibbonTabItem();

                tab.Group  = contextualTG;
                tab.Header = "Design";

                // font group box
                RibbonGroupBox fontGP = new RibbonGroupBox();

                fontGP.Header = "Font";
                tab.Groups.Add(fontGP);

                #region Button Bold
                Fluent.ToggleButton btnBold = new Fluent.ToggleButton();
                btnBold.Margin         = new System.Windows.Thickness(2, 0, 0, 0);
                btnBold.SizeDefinition = "Large";
                btnBold.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-bold-32.png"));
                btnBold.Text = "Bold";

                Binding btnBoldCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleBoldCommand");
                btnBoldCmdn.Mode = BindingMode.OneWay;
                btnBold.SetBinding(Fluent.ToggleButton.CommandProperty, btnBoldCmdn);

                Binding btnBoldIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextBold");
                btnBoldIsChecked.Mode = BindingMode.TwoWay;
                btnBold.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnBoldIsChecked);

                fontGP.Items.Add(btnBold);
                #endregion

                #region Button Italic
                Fluent.ToggleButton btnItalic = new Fluent.ToggleButton();
                btnItalic.Margin         = new System.Windows.Thickness(2, 0, 0, 0);
                btnItalic.SizeDefinition = "Large";
                btnItalic.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-italic-32.png"));
                btnItalic.Text = "Italic";

                Binding btnItalicCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleItalicCommand");
                btnItalicCmdn.Mode = BindingMode.OneWay;
                btnItalic.SetBinding(Fluent.ToggleButton.CommandProperty, btnItalicCmdn);

                Binding btnItalicIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextItalic");
                btnItalicIsChecked.Mode = BindingMode.TwoWay;
                btnItalic.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnItalicIsChecked);

                fontGP.Items.Add(btnItalic);
                #endregion

                #region Button Underline
                Fluent.ToggleButton btnUnderline = new Fluent.ToggleButton();
                btnUnderline.Margin         = new System.Windows.Thickness(2, 0, 0, 0);
                btnUnderline.SizeDefinition = "Large";
                btnUnderline.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-underline-32.png"));
                btnUnderline.Text = "Underline";

                Binding btnUnderlineCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleUnderlineCommand");
                btnUnderlineCmdn.Mode = BindingMode.OneWay;
                btnUnderline.SetBinding(Fluent.ToggleButton.CommandProperty, btnUnderlineCmdn);

                Binding btnUnderlineIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextUnderlined");
                btnUnderlineIsChecked.Mode = BindingMode.TwoWay;
                btnUnderline.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnUnderlineIsChecked);

                fontGP.Items.Add(btnUnderline);
                #endregion

                // format group box
                RibbonGroupBox formatGP = new RibbonGroupBox();
                formatGP.Header = "Format";
                tab.Groups.Add(formatGP);

                #region Button Decrease Indent
                Fluent.Button btnDecIndent = new Fluent.Button();
                btnDecIndent.SizeDefinition = "Large";
                btnDecIndent.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-indent-less-32.png"));
                btnDecIndent.Text = "Decrease Indent";

                Binding btnDecIndentCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlIndentLessCommand");
                btnDecIndentCmdn.Mode = BindingMode.OneWay;
                btnDecIndent.SetBinding(Fluent.Button.CommandProperty, btnDecIndentCmdn);

                formatGP.Items.Add(btnDecIndent);
                #endregion

                #region Button Increase Indent
                Fluent.Button btnIncIndent = new Fluent.Button();
                btnIncIndent.SizeDefinition = "Large";
                btnIncIndent.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-indent-more-32.png"));
                btnIncIndent.Text = "Increase Indent";

                Binding btnIncIndentCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlIndentMoreCommand");
                btnIncIndentCmdn.Mode = BindingMode.OneWay;
                btnIncIndent.SetBinding(Fluent.Button.CommandProperty, btnIncIndentCmdn);

                formatGP.Items.Add(btnIncIndent);
                #endregion

                // alignment group box
                RibbonGroupBox alignGP = new RibbonGroupBox();
                alignGP.Header = "Alignment";
                tab.Groups.Add(alignGP);

                #region Button Align Left
                Fluent.ToggleButton btnLeft = new Fluent.ToggleButton();
                btnLeft.Margin         = new System.Windows.Thickness(2, 0, 0, 0);
                btnLeft.SizeDefinition = "Large";
                btnLeft.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-left-32.png"));
                btnLeft.Text = "Left";

                Binding btnLeftCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignLeftCommand");
                btnLeftCmdn.Mode = BindingMode.OneWay;
                btnLeft.SetBinding(Fluent.ToggleButton.CommandProperty, btnLeftCmdn);

                Binding btnLeftIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedLeft");
                btnLeftIsChecked.Mode = BindingMode.TwoWay;
                btnLeft.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnLeftIsChecked);

                alignGP.Items.Add(btnLeft);
                #endregion

                #region Button Align Center
                Fluent.ToggleButton btnCenter = new Fluent.ToggleButton();
                btnCenter.Margin         = new System.Windows.Thickness(2, 0, 0, 0);
                btnCenter.SizeDefinition = "Large";
                btnCenter.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-center-32.png"));
                btnCenter.Text = "Center";

                Binding btnCenterCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignCenterCommand");
                btnCenterCmdn.Mode = BindingMode.OneWay;
                btnCenter.SetBinding(Fluent.ToggleButton.CommandProperty, btnCenterCmdn);

                Binding btnCenterIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedCenter");
                btnCenterIsChecked.Mode = BindingMode.TwoWay;
                btnCenter.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnCenterIsChecked);

                alignGP.Items.Add(btnCenter);
                #endregion

                #region Button Align Right
                Fluent.ToggleButton btnRight = new Fluent.ToggleButton();
                btnRight.Margin         = new System.Windows.Thickness(2, 0, 0, 0);
                btnRight.SizeDefinition = "Large";
                btnRight.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-right-32.png"));
                btnRight.Text = "Right";

                Binding btnRightCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignRightCommand");
                btnRightCmdn.Mode = BindingMode.OneWay;
                btnRight.SetBinding(Fluent.ToggleButton.CommandProperty, btnRightCmdn);

                Binding btnRightIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedRight");
                btnRightIsChecked.Mode = BindingMode.TwoWay;
                btnRight.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnRightIsChecked);

                alignGP.Items.Add(btnRight);
                #endregion

                #region Button Align Justify
                Fluent.ToggleButton btnJustify = new Fluent.ToggleButton();
                btnJustify.Margin         = new System.Windows.Thickness(2, 0, 0, 0);
                btnJustify.SizeDefinition = "Large";
                btnJustify.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-fill-32.png"));
                btnJustify.Text = "Justify";

                Binding btnJustifyCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignJustifyCommand");
                btnJustifyCmdn.Mode = BindingMode.OneWay;
                btnJustify.SetBinding(Fluent.ToggleButton.CommandProperty, btnJustifyCmdn);

                Binding btnJustifyIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedJustified");
                btnJustifyIsChecked.Mode = BindingMode.TwoWay;
                btnJustify.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnJustifyIsChecked);

                alignGP.Items.Add(btnJustify);
                #endregion

                // insert group box
                RibbonGroupBox insertGP = new RibbonGroupBox();
                insertGP.Header = "Insert";
                tab.Groups.Add(insertGP);

                #region Button Hyperlink
                Fluent.Button btnHyperlink = new Fluent.Button();
                btnHyperlink.SizeDefinition = "Large";
                btnHyperlink.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/Hyperlink.ico"));
                btnHyperlink.Text = "Hyperlink";

                Binding btnHyperlinkCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertHyperlinkCommand");
                btnHyperlinkCmdn.Mode = BindingMode.OneWay;
                btnHyperlink.SetBinding(Fluent.Button.CommandProperty, btnHyperlinkCmdn);

                insertGP.Items.Add(btnHyperlink);
                #endregion

                #region Button Image
                Fluent.Button btnImage = new Fluent.Button();
                btnImage.SizeDefinition = "Large";
                btnImage.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/insert-image-32.png"));
                btnImage.Text = "Image";

                Binding btnImageCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertImageCommand");
                btnImageCmdn.Mode = BindingMode.OneWay;
                btnImage.SetBinding(Fluent.Button.CommandProperty, btnImageCmdn);

                insertGP.Items.Add(btnImage);
                #endregion

                #region Button List
                Fluent.SplitButton btnList = new SplitButton();
                btnList.SizeDefinition = "Large";
                btnList.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/list-32.png"));
                btnList.Text = "List";
                insertGP.Items.Add(btnList);

                Fluent.Button btnBulletedList = new Fluent.Button();
                btnBulletedList.SizeDefinition = "Middle";
                btnBulletedList.Icon           = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/List_BulletsHS.png"));
                btnBulletedList.Text = "Bulleted List";

                Binding btnBulletedListCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertBulletListCommand");
                btnBulletedListCmdn.Mode = BindingMode.OneWay;
                btnBulletedList.SetBinding(Fluent.Button.CommandProperty, btnBulletedListCmdn);

                btnList.Items.Add(btnBulletedList);

                Fluent.Button btnNumberedList = new Fluent.Button();
                btnNumberedList.SizeDefinition = "Middle";
                btnNumberedList.Icon           = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/List_NumberedHS.png"));
                btnNumberedList.Text = "Numbered List";

                Binding btnNumberedListCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertNumberListCommand");
                btnNumberedListCmdn.Mode = BindingMode.OneWay;
                btnNumberedList.SetBinding(Fluent.Button.CommandProperty, btnNumberedListCmdn);

                btnList.Items.Add(btnNumberedList);
                #endregion

                #region Button Table
                Fluent.Button btnTable = new Fluent.Button();
                btnTable.SizeDefinition = "Large";
                btnTable.LargeIcon      = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/table-32.png"));
                btnTable.Text = "Table";

                Binding btnTableCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertTableCommand");
                btnTableCmdn.Mode = BindingMode.OneWay;
                btnTable.SetBinding(Fluent.Button.CommandProperty, btnTableCmdn);

                insertGP.Items.Add(btnTable);
                #endregion

                ribbonMenu.ContextualGroups.Add(contextualTG);
                ribbonMenu.Tabs.Add(tab);

                /*
                 * <fluent:RibbonGroupBox Header="Font">
                 *      <fluent:ToggleButton Text="Bold" Command="{Binding Path=HtmlToggleBoldCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-bold-32.png" IsChecked="{Binding Path=IsSelectionTextBold, Mode=TwoWay}" SizeDefinition="Large"/>
                 *      <fluent:ToggleButton Text="Italic" Command="{Binding Path=HtmlToggleItalicCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-italic-32.png" IsChecked="{Binding Path=IsSelectionTextItalic, Mode=TwoWay}" SizeDefinition="Large"/>
                 *      <fluent:ToggleButton Text="Underline" Command="{Binding Path=HtmlToggleUnderlineCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-underline-32.png" IsChecked="{Binding Path=IsSelectionTextUnderlined, Mode=TwoWay}" SizeDefinition="Large"/>
                 *  </fluent:RibbonGroupBox>
                 *
                 *  <fluent:RibbonGroupBox Header="Format">
                 *      <fluent:Button Text="Decrease Indent" Command="{Binding Path=HtmlIndentLessCommand}" LargeIcon="/Resources/Images/HtmlEditor/format-indent-less-32.png"  SizeDefinition="Large"/>
                 *      <fluent:Button Text="Increase Indent" Command="{Binding Path=HtmlIndentMoreCommand}" LargeIcon="/Resources/Images/HtmlEditor/format-indent-more-32.png" SizeDefinition="Large"/>
                 *  </fluent:RibbonGroupBox>
                 *
                 *  <fluent:RibbonGroupBox Header="Font">
                 *      <fluent:ToggleButton Text="Left" Command="{Binding Path=HtmlAlignLeftCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-left-32.png" IsChecked="{Binding Path=IsSelectionAlignedLeft, Mode=TwoWay}" SizeDefinition="Large"/>
                 *      <fluent:ToggleButton Text="Center" Command="{Binding Path=HtmlAlignCenterCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-center-32.png" IsChecked="{Binding Path=IsSelectionAlignedCenter, Mode=TwoWay}" SizeDefinition="Large"/>
                 *      <fluent:ToggleButton Text="Right" Command="{Binding Path=HtmlAlignRightCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-right-32.png" IsChecked="{Binding Path=IsSelectionAlignedRight, Mode=TwoWay}" SizeDefinition="Large"/>
                 *      <fluent:ToggleButton Text="Justify" Command="{Binding Path=HtmlAlignJustifyCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-fill-32.png" IsChecked="{Binding Path=IsSelectionAlignedJustified, Mode=TwoWay}" SizeDefinition="Large"/>
                 *  </fluent:RibbonGroupBox>
                 *
                 *  <fluent:RibbonGroupBox Header="Insert">
                 *      <fluent:Button Text="Hyperlink" Command="{Binding Path=HtmlInsertHyperlinkCommand}" LargeIcon="/Resources/Images/Ico/Hyperlink.ico"  SizeDefinition="Large"/>
                 *      <fluent:Button Text="Image" Command="{Binding Path=HtmlInsertImageCommand}" LargeIcon="/Resources/Images/HtmlEditor/insert-image-32.png" SizeDefinition="Large"/>
                 *      <fluent:SplitButton Text="List" LargeIcon="/Resources/Images/HtmlEditor/list-32.png" SizeDefinition="Large">
                 *          <fluent:Button Text="Bulleted List" Command="{Binding Path=HtmlInsertBulletListCommand}" Icon="/Resources/Images/HtmlEditor/List_BulletsHS.png" SizeDefinition="Middle"/>
                 *          <fluent:Button Text="Numbered List" Command="{Binding Path=HtmlInsertNumberListCommand}" Icon="/Resources/Images/HtmlEditor/List_NumberedHS.png" SizeDefinition="Middle"/>
                 *      </fluent:SplitButton>
                 *      <fluent:Button Text="Table" Command="{Binding Path=HtmlInsertTableCommand}" LargeIcon="/Resources/Images/HtmlEditor/table-32.png" SizeDefinition="Large"/>
                 *  </fluent:RibbonGroupBox>
                 */
            }
            /// <summary>
            /// Creates the ribbon menu bar for the html editor.
            /// </summary>
            /// <param name="ribbonMenu">Main ribbon menu.</param>
            public override void CreateRibbonMenuBar(Fluent.Ribbon ribbonMenu)
            {
                foreach (RibbonContextualTabGroup t in ribbonMenu.ContextualGroups)
                    if (t.Name == "tabGroupHtml")
                        return;

                // add contextual items for the html editor
                RibbonContextualTabGroup contextualTG = new RibbonContextualTabGroup();
                contextualTG.Name = "tabGroupHtml";
                contextualTG.BorderBrush = new SolidColorBrush(Colors.Orange);
                contextualTG.Background = new SolidColorBrush(Colors.OrangeRed);
                contextualTG.Header = "Html-Editor";

                Binding visibilityBinding = new Binding("ActiveViewModel.SelectedEditorViewModel.IsHtmlEditorViewModelVisible");
                visibilityBinding.Converter = new BooleanToVisibilityConverter();
                visibilityBinding.Mode = BindingMode.OneWay;
                contextualTG.SetBinding(RibbonContextualTabGroup.VisibilityProperty, visibilityBinding);

                // add the html editor tab item
                RibbonTabItem tab = new RibbonTabItem();
                tab.Group = contextualTG;
                tab.Header = "Design";

                // font group box
                RibbonGroupBox fontGP = new RibbonGroupBox();
                fontGP.Header = "Font";
                tab.Groups.Add(fontGP);

                #region Button Bold
                Fluent.ToggleButton btnBold = new Fluent.ToggleButton();
                btnBold.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnBold.SizeDefinition = "Large";
                btnBold.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-bold-32.png"));
                btnBold.Text = "Bold";

                Binding btnBoldCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleBoldCommand");
                btnBoldCmdn.Mode = BindingMode.OneWay;
                btnBold.SetBinding(Fluent.ToggleButton.CommandProperty, btnBoldCmdn);

                Binding btnBoldIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextBold");
                btnBoldIsChecked.Mode = BindingMode.TwoWay;
                btnBold.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnBoldIsChecked);

                fontGP.Items.Add(btnBold);
                #endregion

                #region Button Italic
                Fluent.ToggleButton btnItalic = new Fluent.ToggleButton();
                btnItalic.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnItalic.SizeDefinition = "Large";
                btnItalic.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-italic-32.png"));
                btnItalic.Text = "Italic";

                Binding btnItalicCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleItalicCommand");
                btnItalicCmdn.Mode = BindingMode.OneWay;
                btnItalic.SetBinding(Fluent.ToggleButton.CommandProperty, btnItalicCmdn);

                Binding btnItalicIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextItalic");
                btnItalicIsChecked.Mode = BindingMode.TwoWay;
                btnItalic.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnItalicIsChecked);

                fontGP.Items.Add(btnItalic);
                #endregion

                #region Button Underline
                Fluent.ToggleButton btnUnderline = new Fluent.ToggleButton();
                btnUnderline.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnUnderline.SizeDefinition = "Large";
                btnUnderline.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-text-underline-32.png"));
                btnUnderline.Text = "Underline";

                Binding btnUnderlineCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlToggleUnderlineCommand");
                btnUnderlineCmdn.Mode = BindingMode.OneWay;
                btnUnderline.SetBinding(Fluent.ToggleButton.CommandProperty, btnUnderlineCmdn);

                Binding btnUnderlineIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionTextUnderlined");
                btnUnderlineIsChecked.Mode = BindingMode.TwoWay;
                btnUnderline.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnUnderlineIsChecked);

                fontGP.Items.Add(btnUnderline);
                #endregion

                // format group box
                RibbonGroupBox formatGP = new RibbonGroupBox();
                formatGP.Header = "Format";
                tab.Groups.Add(formatGP);

                #region Button Decrease Indent
                Fluent.Button btnDecIndent = new Fluent.Button();
                btnDecIndent.SizeDefinition = "Large";
                btnDecIndent.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-indent-less-32.png"));
                btnDecIndent.Text = "Decrease Indent";

                Binding btnDecIndentCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlIndentLessCommand");
                btnDecIndentCmdn.Mode = BindingMode.OneWay;
                btnDecIndent.SetBinding(Fluent.Button.CommandProperty, btnDecIndentCmdn);

                formatGP.Items.Add(btnDecIndent);
                #endregion

                #region Button Increase Indent
                Fluent.Button btnIncIndent = new Fluent.Button();
                btnIncIndent.SizeDefinition = "Large";
                btnIncIndent.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-indent-more-32.png"));
                btnIncIndent.Text = "Increase Indent";

                Binding btnIncIndentCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlIndentMoreCommand");
                btnIncIndentCmdn.Mode = BindingMode.OneWay;
                btnIncIndent.SetBinding(Fluent.Button.CommandProperty, btnIncIndentCmdn);

                formatGP.Items.Add(btnIncIndent);
                #endregion

                // alignment group box
                RibbonGroupBox alignGP = new RibbonGroupBox();
                alignGP.Header = "Alignment";
                tab.Groups.Add(alignGP);

                #region Button Align Left
                Fluent.ToggleButton btnLeft = new Fluent.ToggleButton();
                btnLeft.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnLeft.SizeDefinition = "Large";
                btnLeft.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-left-32.png"));
                btnLeft.Text = "Left";

                Binding btnLeftCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignLeftCommand");
                btnLeftCmdn.Mode = BindingMode.OneWay;
                btnLeft.SetBinding(Fluent.ToggleButton.CommandProperty, btnLeftCmdn);

                Binding btnLeftIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedLeft");
                btnLeftIsChecked.Mode = BindingMode.TwoWay;
                btnLeft.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnLeftIsChecked);

                alignGP.Items.Add(btnLeft);
                #endregion

                #region Button Align Center
                Fluent.ToggleButton btnCenter = new Fluent.ToggleButton();
                btnCenter.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnCenter.SizeDefinition = "Large";
                btnCenter.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-center-32.png"));
                btnCenter.Text = "Center";

                Binding btnCenterCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignCenterCommand");
                btnCenterCmdn.Mode = BindingMode.OneWay;
                btnCenter.SetBinding(Fluent.ToggleButton.CommandProperty, btnCenterCmdn);

                Binding btnCenterIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedCenter");
                btnCenterIsChecked.Mode = BindingMode.TwoWay;
                btnCenter.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnCenterIsChecked);

                alignGP.Items.Add(btnCenter);
                #endregion

                #region Button Align Right
                Fluent.ToggleButton btnRight = new Fluent.ToggleButton();
                btnRight.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnRight.SizeDefinition = "Large";
                btnRight.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-right-32.png"));
                btnRight.Text = "Right";

                Binding btnRightCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignRightCommand");
                btnRightCmdn.Mode = BindingMode.OneWay;
                btnRight.SetBinding(Fluent.ToggleButton.CommandProperty, btnRightCmdn);

                Binding btnRightIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedRight");
                btnRightIsChecked.Mode = BindingMode.TwoWay;
                btnRight.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnRightIsChecked);

                alignGP.Items.Add(btnRight);
                #endregion

                #region Button Align Justify
                Fluent.ToggleButton btnJustify = new Fluent.ToggleButton();
                btnJustify.Margin = new System.Windows.Thickness(2, 0, 0, 0);
                btnJustify.SizeDefinition = "Large";
                btnJustify.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/format-justify-fill-32.png"));
                btnJustify.Text = "Justify";

                Binding btnJustifyCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlAlignJustifyCommand");
                btnJustifyCmdn.Mode = BindingMode.OneWay;
                btnJustify.SetBinding(Fluent.ToggleButton.CommandProperty, btnJustifyCmdn);

                Binding btnJustifyIsChecked = new Binding("ActiveViewModel.SelectedEditorViewModel.IsSelectionAlignedJustified");
                btnJustifyIsChecked.Mode = BindingMode.TwoWay;
                btnJustify.SetBinding(Fluent.ToggleButton.IsCheckedProperty, btnJustifyIsChecked);

                alignGP.Items.Add(btnJustify);
                #endregion

                // insert group box
                RibbonGroupBox insertGP = new RibbonGroupBox();
                insertGP.Header = "Insert";
                tab.Groups.Add(insertGP);

                #region Button Hyperlink
                Fluent.Button btnHyperlink = new Fluent.Button();
                btnHyperlink.SizeDefinition = "Large";
                btnHyperlink.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/Hyperlink.ico"));
                btnHyperlink.Text = "Hyperlink";

                Binding btnHyperlinkCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertHyperlinkCommand");
                btnHyperlinkCmdn.Mode = BindingMode.OneWay;
                btnHyperlink.SetBinding(Fluent.Button.CommandProperty, btnHyperlinkCmdn);

                insertGP.Items.Add(btnHyperlink);
                #endregion

                #region Button Image
                Fluent.Button btnImage = new Fluent.Button();
                btnImage.SizeDefinition = "Large";
                btnImage.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/insert-image-32.png"));
                btnImage.Text = "Image";

                Binding btnImageCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertImageCommand");
                btnImageCmdn.Mode = BindingMode.OneWay;
                btnImage.SetBinding(Fluent.Button.CommandProperty, btnImageCmdn);

                insertGP.Items.Add(btnImage);
                #endregion

                #region Button List
                Fluent.SplitButton btnList = new SplitButton();
                btnList.SizeDefinition = "Large";
                btnList.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/list-32.png"));
                btnList.Text = "List";
                insertGP.Items.Add(btnList);

                Fluent.Button btnBulletedList = new Fluent.Button();
                btnBulletedList.SizeDefinition = "Middle";
                btnBulletedList.Icon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/List_BulletsHS.png"));
                btnBulletedList.Text = "Bulleted List";

                Binding btnBulletedListCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertBulletListCommand");
                btnBulletedListCmdn.Mode = BindingMode.OneWay;
                btnBulletedList.SetBinding(Fluent.Button.CommandProperty, btnBulletedListCmdn);

                btnList.Items.Add(btnBulletedList);

                Fluent.Button btnNumberedList = new Fluent.Button();
                btnNumberedList.SizeDefinition = "Middle";
                btnNumberedList.Icon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/List_NumberedHS.png"));
                btnNumberedList.Text = "Numbered List";

                Binding btnNumberedListCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertNumberListCommand");
                btnNumberedListCmdn.Mode = BindingMode.OneWay;
                btnNumberedList.SetBinding(Fluent.Button.CommandProperty, btnNumberedListCmdn);

                btnList.Items.Add(btnNumberedList);
                #endregion

                #region Button Table
                Fluent.Button btnTable = new Fluent.Button();
                btnTable.SizeDefinition = "Large";
                btnTable.LargeIcon = new System.Windows.Media.Imaging.BitmapImage(
                    new Uri("pack://application:,,,/Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions;component/Resources/Images/HtmlEditor/table-32.png"));
                btnTable.Text = "Table";

                Binding btnTableCmdn = new Binding("ActiveViewModel.SelectedEditorViewModel.HtmlInsertTableCommand");
                btnTableCmdn.Mode = BindingMode.OneWay;
                btnTable.SetBinding(Fluent.Button.CommandProperty, btnTableCmdn);

                insertGP.Items.Add(btnTable);
                #endregion

                ribbonMenu.ContextualGroups.Add(contextualTG);
                ribbonMenu.Tabs.Add(tab);

                /*
                <fluent:RibbonGroupBox Header="Font">
                        <fluent:ToggleButton Text="Bold" Command="{Binding Path=HtmlToggleBoldCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-bold-32.png" IsChecked="{Binding Path=IsSelectionTextBold, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Italic" Command="{Binding Path=HtmlToggleItalicCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-italic-32.png" IsChecked="{Binding Path=IsSelectionTextItalic, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Underline" Command="{Binding Path=HtmlToggleUnderlineCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-text-underline-32.png" IsChecked="{Binding Path=IsSelectionTextUnderlined, Mode=TwoWay}" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>

                    <fluent:RibbonGroupBox Header="Format">
                        <fluent:Button Text="Decrease Indent" Command="{Binding Path=HtmlIndentLessCommand}" LargeIcon="/Resources/Images/HtmlEditor/format-indent-less-32.png"  SizeDefinition="Large"/>
                        <fluent:Button Text="Increase Indent" Command="{Binding Path=HtmlIndentMoreCommand}" LargeIcon="/Resources/Images/HtmlEditor/format-indent-more-32.png" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>

                    <fluent:RibbonGroupBox Header="Font">
                        <fluent:ToggleButton Text="Left" Command="{Binding Path=HtmlAlignLeftCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-left-32.png" IsChecked="{Binding Path=IsSelectionAlignedLeft, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Center" Command="{Binding Path=HtmlAlignCenterCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-center-32.png" IsChecked="{Binding Path=IsSelectionAlignedCenter, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Right" Command="{Binding Path=HtmlAlignRightCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-right-32.png" IsChecked="{Binding Path=IsSelectionAlignedRight, Mode=TwoWay}" SizeDefinition="Large"/>
                        <fluent:ToggleButton Text="Justify" Command="{Binding Path=HtmlAlignJustifyCommand}" Margin="2,0,0,0" LargeIcon="/Resources/Images/HtmlEditor/format-justify-fill-32.png" IsChecked="{Binding Path=IsSelectionAlignedJustified, Mode=TwoWay}" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>

                    <fluent:RibbonGroupBox Header="Insert">
                        <fluent:Button Text="Hyperlink" Command="{Binding Path=HtmlInsertHyperlinkCommand}" LargeIcon="/Resources/Images/Ico/Hyperlink.ico"  SizeDefinition="Large"/>
                        <fluent:Button Text="Image" Command="{Binding Path=HtmlInsertImageCommand}" LargeIcon="/Resources/Images/HtmlEditor/insert-image-32.png" SizeDefinition="Large"/>
                        <fluent:SplitButton Text="List" LargeIcon="/Resources/Images/HtmlEditor/list-32.png" SizeDefinition="Large">
                            <fluent:Button Text="Bulleted List" Command="{Binding Path=HtmlInsertBulletListCommand}" Icon="/Resources/Images/HtmlEditor/List_BulletsHS.png" SizeDefinition="Middle"/>
                            <fluent:Button Text="Numbered List" Command="{Binding Path=HtmlInsertNumberListCommand}" Icon="/Resources/Images/HtmlEditor/List_NumberedHS.png" SizeDefinition="Middle"/>
                        </fluent:SplitButton>
                        <fluent:Button Text="Table" Command="{Binding Path=HtmlInsertTableCommand}" LargeIcon="/Resources/Images/HtmlEditor/table-32.png" SizeDefinition="Large"/>
                    </fluent:RibbonGroupBox>
                */
            }
Exemple #13
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.fmMain = ((LEDX.MWin)(target));
                return;

            case 2:
                this.ribbon = ((Fluent.Ribbon)(target));

            #line 57 "..\..\MainWindow.xaml"
                this.ribbon.SelectedTabChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Ribbon_SelectedTabChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.btNewProj = ((Fluent.Button)(target));
                return;

            case 4:
                this.btOpenProj = ((Fluent.Button)(target));
                return;

            case 5:
                this.btSaveProj = ((Fluent.Button)(target));
                return;

            case 6:
                this.tbEdit = ((Fluent.RibbonTabItem)(target));
                return;

            case 7:
                this.btUndo = ((Fluent.SplitButton)(target));
                return;

            case 8:
                this.btPasteFram = ((Fluent.SplitButton)(target));
                return;

            case 9:
                this.rgbContrProp = ((Fluent.RibbonGroupBox)(target));
                return;

            case 10:
                this.spAddNew = ((Fluent.SplitButton)(target));
                return;

            case 11:
                this.btDel = ((Fluent.MenuItem)(target));
                return;

            case 12:
                this.tbConName = ((Fluent.TextBox)(target));
                return;

            case 13:
                this.tbConNumb = ((Fluent.Spinner)(target));
                return;

            case 14:
                this.tbConButt = ((Fluent.Spinner)(target));
                return;

            case 15:
                this.rgbFrameProp = ((Fluent.RibbonGroupBox)(target));
                return;

            case 16:
                this.spTime = ((Fluent.Spinner)(target));
                return;

            case 17:
                this.btCopyFram = ((Fluent.Button)(target));
                return;

            case 18:
                this.btCutFram = ((Fluent.Button)(target));
                return;

            case 19:
                this.btDelFram = ((Fluent.Button)(target));
                return;

            case 20:
                this.btToSample = ((Fluent.Button)(target));
                return;

            case 21:
                this.spbtFSet = ((Fluent.SplitButton)(target));

            #line 179 "..\..\MainWindow.xaml"
                this.spbtFSet.DropDownClosed += new System.EventHandler(this.SpbtFSet_DropDownClosed);

            #line default
            #line hidden
                return;

            case 22:
                this.rgbColorProp = ((Fluent.RibbonGroupBox)(target));
                return;

            case 23:
                this.btBegColor = ((Fluent.Button)(target));
                return;

            case 24:
                this.rctBegClolor = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 25:
                this.btCopyColor = ((Fluent.Button)(target));
                return;

            case 26:
                this.btGetColor = ((Fluent.Button)(target));
                return;

            case 27:
                this.btEndColor = ((Fluent.Button)(target));
                return;

            case 28:
                this.rctEndClolor = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 29:
                this.btCopy = ((Fluent.Button)(target));
                return;

            case 30:
                this.grSampl = ((Fluent.InRibbonGallery)(target));
                return;

            case 31:
                this.tbPalyer = ((Fluent.RibbonTabItem)(target));
                return;

            case 32:
                this.rgbPropLayer = ((Fluent.RibbonGroupBox)(target));
                return;

            case 33:
                this.btLayerDown = ((Fluent.Button)(target));
                return;

            case 34:
                this.btLayerTop = ((Fluent.Button)(target));
                return;

            case 35:
                this.btDelLay = ((Fluent.Button)(target));
                return;

            case 36:
                this.rgbPropPng = ((Fluent.RibbonGroupBox)(target));
                return;

            case 37:
                this.cbController = ((Fluent.ComboBox)(target));
                return;

            case 38:
                this.lgWidth = ((Fluent.TextBox)(target));
                return;

            case 39:
                this.lgHeight = ((Fluent.TextBox)(target));
                return;

            case 40:
                this.rgbPropText = ((Fluent.RibbonGroupBox)(target));
                return;

            case 41:
                this.lbtemTest = ((System.Windows.Controls.Label)(target));
                return;

            case 42:
                this.temTest = ((LEDX.Components.MultiLineTextEditor)(target));
                return;

            case 43:
                this.spTextSize = ((Fluent.Spinner)(target));
                return;

            case 44:
                this.cbFontFamaly = ((Fluent.ComboBox)(target));
                return;

            case 45:
                this.rctTextClolor = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 46:
                this.tbFlash = ((Fluent.RibbonTabItem)(target));
                return;

            case 47:
                this.lbPort = ((System.Windows.Controls.Label)(target));
                return;

            case 48:
                this.cbComName = ((Fluent.ComboBox)(target));
                return;

            case 49:
                this.lbSpeed = ((System.Windows.Controls.Label)(target));
                return;

            case 50:
                this.cbComRate = ((Fluent.ComboBox)(target));
                return;

            case 51:
                this.btRefrPorts = ((Fluent.Button)(target));
                return;

            case 52:
                this.tbSync = ((Fluent.ToggleButton)(target));
                return;

            case 53:
                this.tgbShowLog = ((Fluent.ToggleButton)(target));
                return;

            case 54:
                this.spProgress = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 55:
                this.uiScaleSlider = ((System.Windows.Controls.Slider)(target));

            #line 531 "..\..\MainWindow.xaml"
                this.uiScaleSlider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.uiScaleSlider_ValueChanged);

            #line default
            #line hidden
                return;

            case 56:
                this.uiMan = ((LEDX.Components.PlayScale)(target));
                return;

            case 57:
                this.svSearch = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 58:
                this.sldTime = ((LEDX.Components.TimeSlider)(target));

            #line 561 "..\..\MainWindow.xaml"
                this.sldTime.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sld_ValueChanged);

            #line default
            #line hidden
                return;

            case 59:
                this.scroll = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 60:
                this.icContr = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 61:
                this.svTracks = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 62:
                this.icTrack = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 63:
                this.iCanv = ((LEDX.Components.IncRender)(target));

            #line 598 "..\..\MainWindow.xaml"
                this.iCanv.SelectionChanged += new System.EventHandler(this.iCanv_SelectionChanged);

            #line default
            #line hidden
                return;

            case 64:
                this.mainScroller = ((System.Windows.Controls.ScrollViewer)(target));

            #line 607 "..\..\MainWindow.xaml"
                this.mainScroller.ScrollChanged += new System.Windows.Controls.ScrollChangedEventHandler(this.mainScroller_ScrollChanged);

            #line default
            #line hidden
                return;

            case 65:
                this.svLog = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 66:
                this.tbLog = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }