void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ribbon = ((Microsoft.Windows.Controls.Ribbon.Ribbon)(target)); return; case 2: this.nowy_dok = ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)); #line 14 "..\..\MainWindow.xaml" this.nowy_dok.Click += new System.Windows.RoutedEventHandler(this.nowy_dok_Click); #line default #line hidden return; case 3: this.open_dok = ((Microsoft.Windows.Controls.Ribbon.RibbonMenuItem)(target)); #line 15 "..\..\MainWindow.xaml" this.open_dok.Click += new System.Windows.RoutedEventHandler(this.open_dok_Click); #line default #line hidden return; case 4: this.wklej = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 21 "..\..\MainWindow.xaml" this.wklej.Click += new System.Windows.RoutedEventHandler(this.wklej_Click); #line default #line hidden return; case 5: this.czonkagroup = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 6: this.fontcombo = ((Microsoft.Windows.Controls.Ribbon.RibbonComboBox)(target)); return; case 7: this.upbutton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 27 "..\..\MainWindow.xaml" this.upbutton.Click += new System.Windows.RoutedEventHandler(this.upbutton_Click); #line default #line hidden return; case 8: this.sizecombo = ((Microsoft.Windows.Controls.Ribbon.RibbonComboBox)(target)); return; case 9: #line 29 "..\..\MainWindow.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonGallery)(target)).SelectionChanged += new System.Windows.RoutedPropertyChangedEventHandler<object>(this.RibbonGallery_SelectionChanged); #line default #line hidden return; case 10: this.richTextBox = ((System.Windows.Controls.RichTextBox)(target)); #line 43 "..\..\MainWindow.xaml" this.richTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.richTextBox_TextChanged); #line default #line hidden return; case 11: this.comboBox = ((System.Windows.Controls.ComboBox)(target)); #line 50 "..\..\MainWindow.xaml" this.comboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBox_SelectionChanged); #line default #line hidden return; case 12: this.Text4 = ((System.Windows.Controls.ComboBoxItem)(target)); return; case 13: this.asdasdasd = ((System.Windows.Controls.ComboBoxItem)(target)); return; } this._contentLoaded = true; }
private static Control MapQatDataToControl(VM.QatItem qatItem) { string typeName = qatItem.Instance.GetType().Name; Control control = null; switch (typeName) { case "ButtonData": { control = new RibbonButton(); control.DataContext = qatItem.Instance; break; } case "ToggleButtonData": { control = new RibbonToggleButton(); control.DataContext = qatItem.Instance; break; } case "RadioButtonData": { control = new RibbonRadioButton(); control.DataContext = qatItem.Instance; break; } case "CheckBoxData": { control = new RibbonCheckBox(); control.DataContext = qatItem.Instance; break; } case "TextBoxData": { control = new RibbonTextBox(); control.DataContext = qatItem.Instance; break; } case "MenuButtonData": { control = new RibbonMenuButton(); control.DataContext = qatItem.Instance; break; } case "SplitButtonData": { if (!qatItem.IsSplitHeader) { control = new RibbonSplitButton(); } else { VM.SplitButtonData splitButtonData = (VM.SplitButtonData)qatItem.Instance; if (splitButtonData.IsCheckable) { control = new RibbonToggleButton(); } else { control = new RibbonButton(); } } control.DataContext = qatItem.Instance; break; } case "ComboBoxData": { control = new RibbonComboBox(); control.DataContext = qatItem.Instance; break; } case "MenuItemData": { VM.MenuItemData menuItemData = (VM.MenuItemData)qatItem.Instance; if (menuItemData.ControlDataCollection.Count > 0) { control = new RibbonMenuButton(); } else { control = new RibbonButton(); } control.DataContext = qatItem.Instance; break; } case "SplitMenuItemData": { VM.SplitMenuItemData splitMenuItemData = (VM.SplitMenuItemData)qatItem.Instance; if (!qatItem.IsSplitHeader) { if (splitMenuItemData.ControlDataCollection.Count > 0) { control = new RibbonSplitButton(); } else if (splitMenuItemData.IsCheckable) { control = new RibbonToggleButton(); } else { control = new RibbonButton(); } } else { control = new RibbonToggleButton(); } control.DataContext = qatItem.Instance; break; } case "GalleryData": { RibbonGallery gallery = new RibbonGallery(); RibbonMenuButton menuButton = new RibbonMenuButton(); menuButton.ItemsSource = new object[] { gallery }; control = menuButton; control.DataContext = qatItem.Instance; break; } case "GroupData": { control = new RibbonGroup(); control.DataContext = qatItem.Instance; break; } } return control; }
private void SelectRibbonCbxItem(RibbonComboBox ribComboBox, string strFontName) { if (String.IsNullOrEmpty(strFontName)) { return; } foreach (RibbonComboBoxItem rcbxItem in ribComboBox.Items) { if (((string)rcbxItem.Content).ToLower() == strFontName.ToLower()) { ribComboBox.SelectedItem = rcbxItem; ribComboBox.UpdateLayout(); } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 40 "..\..\..\MainWindow.xaml" ((SBW2.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.RibbonWindowClosing); #line default #line hidden return; case 2: this.StartStopQAB = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 3: this.StartRB = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 4: this.StopRB = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 5: this.RestartRB = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 6: this.Ribbon_Status = ((Microsoft.Windows.Controls.Ribbon.RibbonTwoLineText)(target)); return; case 7: this.MemStats = ((Microsoft.Windows.Controls.Ribbon.RibbonTwoLineText)(target)); return; case 8: this.Uptime = ((Microsoft.Windows.Controls.Ribbon.RibbonTwoLineText)(target)); return; case 9: this.memcb = ((Microsoft.Windows.Controls.Ribbon.RibbonComboBox)(target)); return; case 10: this.memboxGal = ((Microsoft.Windows.Controls.Ribbon.RibbonGallery)(target)); #line 103 "..\..\..\MainWindow.xaml" this.memboxGal.SelectionChanged += new System.Windows.RoutedPropertyChangedEventHandler<object>(this.MemoryComboBoxSelectionChanged); #line default #line hidden return; case 11: this.MemoryComboBox = ((Microsoft.Windows.Controls.Ribbon.RibbonGalleryCategory)(target)); return; case 12: this.NetworkToggle = ((Microsoft.Windows.Controls.Ribbon.RibbonToggleButton)(target)); #line 118 "..\..\..\MainWindow.xaml" this.NetworkToggle.Checked += new System.Windows.RoutedEventHandler(this.NetToggleChecked); #line default #line hidden #line 119 "..\..\..\MainWindow.xaml" this.NetworkToggle.Unchecked += new System.Windows.RoutedEventHandler(this.NetworkToggleUnchecked); #line default #line hidden return; case 13: this.outputBox = ((System.Windows.Controls.RichTextBox)(target)); return; case 14: this.inputBox = ((System.Windows.Controls.TextBox)(target)); #line 138 "..\..\..\MainWindow.xaml" this.inputBox.KeyDown += new System.Windows.Input.KeyEventHandler(this.TextBoxKeyDown); #line default #line hidden return; case 15: this.StartThumb = ((System.Windows.Shell.ThumbButtonInfo)(target)); return; case 16: this.StopThumb = ((System.Windows.Shell.ThumbButtonInfo)(target)); return; case 17: this.RestartThumb = ((System.Windows.Shell.ThumbButtonInfo)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 2: this.RibbonRow = ((System.Windows.Controls.RowDefinition)(target)); return; case 3: this.ClientRow = ((System.Windows.Controls.RowDefinition)(target)); return; case 4: this.ApplicationRibbon = ((Microsoft.Windows.Controls.Ribbon.Ribbon)(target)); #line 80 "..\..\..\..\MVVM\Views\ShellWindow.xaml" this.ApplicationRibbon.Loaded += new System.Windows.RoutedEventHandler(this.ApplicationRibbon_Loaded); #line default #line hidden return; case 5: this.EditionTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target)); return; case 6: this.SaveGroup = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 7: this.SaveRecordButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 8: this.NewGroup = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 9: this.NewRecordButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 10: this.EditGroup = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 11: this.EditRecordButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 12: this.DeleteRecordButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 13: this.SearchGroup = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 14: this.GetRecordsButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 15: this.PagingGroup = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 16: this.GoBeginingButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 17: this.ForwardPageButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 18: this.NextPageButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 19: this.LastPageButton = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 20: this.SelectedLanguage = ((Microsoft.Windows.Controls.Ribbon.RibbonComboBox)(target)); return; case 21: this.ClientArea = ((System.Windows.Controls.Grid)(target)); return; case 22: this.dockingManager = ((AvalonDock.DockingManager)(target)); return; case 23: this.TaskRegion = ((System.Windows.Controls.ItemsControl)(target)); return; case 24: this.NavigationRegion = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Initialize Automation Peer for RibbonComboBox /// </summary> public RibbonComboBoxAutomationPeer(RibbonComboBox owner) : base(owner) { }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 36 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 36 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OnPaste); #line default #line hidden return; case 2: #line 39 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 39 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OnCut); #line default #line hidden return; case 3: #line 42 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 42 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OnCopy); #line default #line hidden return; case 4: #line 44 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 45 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 5: #line 47 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 48 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 6: #line 50 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 51 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 7: #line 53 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 54 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 8: #line 56 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.OpenCommandCanExecute); #line default #line hidden #line 57 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenCommandExecuted); #line default #line hidden return; case 9: #line 59 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 60 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 10: #line 62 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 63 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 11: #line 65 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 66 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 12: #line 68 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 69 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 13: #line 71 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RibbonCommandCanExecute); #line default #line hidden #line 72 "..\..\..\..\..\Control\Aggregate\MainRibbon.xaml" ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCommandExecuted); #line default #line hidden return; case 14: this.ApplicationRibbon = ((Microsoft.Windows.Controls.Ribbon.Ribbon)(target)); return; case 15: this.TabHome = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target)); return; case 16: this.GroupClipBoard = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 17: this.ButtonPaste = ((Microsoft.Windows.Controls.Ribbon.RibbonSplitButton)(target)); return; case 18: this.ButtonCut = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 19: this.ButtonCopy = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); return; case 20: this.GroupShape = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 21: this.ComboBoxShape = ((Microsoft.Windows.Controls.Ribbon.RibbonComboBox)(target)); return; case 22: this.GroupEnamels = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 23: this.ComboBoxEnamels = ((Microsoft.Windows.Controls.Ribbon.RibbonComboBox)(target)); return; case 24: this.TabInsert = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target)); return; } this._contentLoaded = true; }