public ToolBarComboBox(Codon codon, object caller) { if (codon == null) throw new ArgumentNullException("codon"); this.IsEditable = false; menuCommand = (IComboBoxCommand)codon.AddIn.CreateObject(codon.Properties["class"]); menuCommand.ComboBox = this; menuCommand.Owner = caller; SetResourceReference(FrameworkElement.StyleProperty, ToolBar.ComboBoxStyleKey); }
public ToolBarComboBox(Codon codon, object caller) { if (codon == null) { throw new ArgumentNullException("codon"); } this.IsEditable = false; menuCommand = (IComboBoxCommand)codon.AddIn.CreateObject(codon.Properties["class"]); menuCommand.Owner = this; SetResourceReference(FrameworkElement.StyleProperty, ToolBar.ComboBoxStyleKey); }
public ToolBarComboBox(Codon codon, object caller) { if (codon == null) { throw new ArgumentNullException("codon"); } this.codon = codon; ToolTipService.SetShowOnDisabled(this, true); this.IsEditable = false; menuCommand = (IComboBoxCommand)codon.AddIn.CreateObject(codon.Properties["class"]); menuCommand.ComboBox = this; menuCommand.Owner = caller; UpdateText(); SetResourceReference(FrameworkElement.StyleProperty, ToolBar.ComboBoxStyleKey); }
public ToolBarComboBox(Codon codon, object caller, IEnumerable<ICondition> conditions) { if (codon == null) throw new ArgumentNullException("codon"); this.codon = codon; this.caller = caller; this.conditions = conditions; ToolTipService.SetShowOnDisabled(this, true); this.IsEditable = false; menuCommand = (IComboBoxCommand)codon.AddIn.CreateObject(codon.Properties["class"]); menuCommand.ComboBox = this; menuCommand.Owner = caller; UpdateText(); SetResourceReference(FrameworkElement.StyleProperty, ToolBar.ComboBoxStyleKey); }
public ToolBarComboBox(Codon codon, object caller) { this.RightToLeft = RightToLeft.Inherit; ComboBox.DropDownStyle = ComboBoxStyle.DropDownList; ComboBox.SelectionChangeCommitted += new EventHandler(selectionChanged); ComboBox.KeyDown += new KeyEventHandler(ComboBoxKeyDown); this.caller = caller; this.codon = codon; menuCommand = (IComboBoxCommand)codon.AddIn.CreateObject(codon.Properties["class"]); menuCommand.Owner = this; if (menuCommand == null) { throw new NullReferenceException("Can't create combobox menu command"); } UpdateText(); UpdateStatus(); }
public ToolBarComboBox(Codon codon, object caller) { //this.RightToLeft = RightToLeft.Inherit; ComboBox.DropDownStyle = ComboBoxStyle.DropDownList; ComboBox.SelectionChangeCommitted += new EventHandler(selectionChanged); ComboBox.KeyDown += new KeyEventHandler(ComboBoxKeyDown); this.caller = caller; this.codon = codon; menuCommand = (IComboBoxCommand)codon.AddIn.CreateObject(codon.Properties["class"]); menuCommand.Owner = this; if (menuCommand == null) { throw new NullReferenceException("Can't create combobox menu command"); } UpdateText(); UpdateStatus(); }
private void CreateCommand(Codon codon) { this.menuCommand = (IComboBoxCommand) codon.AddIn.CreateObject(codon.Properties["class"]); this.menuCommand.ID = codon.Id; this.menuCommand.Owner = this; this.menuCommand.Codon = codon; }