protected void AddColorSelectionCombo(string itemKey, string itemTitle) { RadioLog.WPFCommon.BrushSelectionHolder[] colors = RadioLog.WPFCommon.ColorHelper.GetBrushSelectionItems(); System.Collections.ObjectModel.ObservableCollection <RadioLog.WPFCommon.BrushSelectionHolder> colorList = new System.Collections.ObjectModel.ObservableCollection <WPFCommon.BrushSelectionHolder>(colors); colorList.Insert(0, new WPFCommon.BrushSelectionHolder("Default", null)); ResponderApps.EditorDisplay.ComboBoxEditorItem cbColor = new ResponderApps.EditorDisplay.ComboBoxEditorItem(itemKey, itemTitle); cbColor.ItemsSource = colorList; cbColor.DisplayMemberPath = "BrushName"; cbColor.SelectedValuePath = "BrushKey"; cbColor.SelectedIndex = 0; this.editControl.AddEditorItem(cbColor); }
protected void AddColorSelectionCombo(string itemKey, string itemTitle) { RadioLog.WPFCommon.BrushSelectionHolder[] colors = RadioLog.WPFCommon.ColorHelper.GetBrushSelectionItems(); System.Collections.ObjectModel.ObservableCollection<RadioLog.WPFCommon.BrushSelectionHolder> colorList = new System.Collections.ObjectModel.ObservableCollection<WPFCommon.BrushSelectionHolder>(colors); colorList.Insert(0, new WPFCommon.BrushSelectionHolder("Default", null)); ResponderApps.EditorDisplay.ComboBoxEditorItem cbColor = new ResponderApps.EditorDisplay.ComboBoxEditorItem(itemKey, itemTitle); cbColor.ItemsSource = colorList; cbColor.DisplayMemberPath = "BrushName"; cbColor.SelectedValuePath = "BrushKey"; cbColor.SelectedIndex = 0; this.editControl.AddEditorItem(cbColor); }
protected void AddComboBoxItem(string itemKey, string itemTitle, string displayMemberPath, string selectedValuePath, IEnumerable itemsSource, object selectedValue) { ResponderApps.EditorDisplay.ComboBoxEditorItem item = new ResponderApps.EditorDisplay.ComboBoxEditorItem(itemKey, itemTitle, displayMemberPath, selectedValuePath, itemsSource, selectedValue); this.editControl.AddEditorItem(item); }