private static ComboBoxKeyCommandBehavior GetOrCreateBehavior(ComboBox comboBox) { var behavior = comboBox.GetValue(ComboBoxKeyCommandBehaviorProperty) as ComboBoxKeyCommandBehavior; if (behavior == null) { behavior = new ComboBoxKeyCommandBehavior(comboBox); comboBox.SetValue(ComboBoxKeyCommandBehaviorProperty, behavior); } return behavior; }
/// <summary> /// Indicates whether given ComboBox is a part of the Snoop UI. /// If ComboBox is a part of Snoop UI it doesn't take part in /// routed events monitoring. /// </summary> /// <param name="obj"></param> /// <returns></returns> public static bool GetIsSnoopPart(ComboBox obj) { return (bool)obj.GetValue(IsSnoopPartProperty); }
public static DataTemplate GetSelectedTemplate(ComboBox obj) { return (DataTemplate)obj.GetValue(SelectedTemplateProperty); }
public static DataTemplate GetDropDownTemplate(ComboBox obj) { return (DataTemplate)obj.GetValue(DropDownTemplateProperty); }
/// <summary> /// Gets the open drop down automatically. /// </summary> /// <param name="cbo">The combobox.</param> /// <returns>should open automatically</returns> public static bool GetOpenDropDownAutomatically(ComboBox cbo) { return (bool)cbo.GetValue(openDropDownAutomaticallyProperty); }
public static bool GetAutoSize(ComboBox comboBox) { return (bool) comboBox.GetValue(AutoSizeProperty); }
private static ComboBoxSelectChangedCommandBehavior GetOrCreateBehavior(ComboBox cBox) { var behavior = cBox.GetValue(SelectedChangedCommandBehaviorProperty) as ComboBoxSelectChangedCommandBehavior; if (behavior == null) { behavior = new ComboBoxSelectChangedCommandBehavior(cBox); cBox.SetValue(SelectedChangedCommandBehaviorProperty, behavior); } return behavior; }
/// <summary> /// Gets command parameter combobox /// </summary> /// <param name="cBox"></param> /// <returns></returns> public static object GetCommandParameter(ComboBox cBox) { if (cBox == null) throw new System.ArgumentNullException("cBox"); return cBox.GetValue(CommandParameterProperty); }
/// <summary> /// Gets command to combobox /// </summary> /// <param name="cBox"></param> /// <returns></returns> public static ICommand GetCommand(ComboBox cBox) { if (cBox == null) throw new System.ArgumentNullException("cBox"); return cBox.GetValue(CommandProperty) as ICommand; }
public static Style GetLabelStyle(ComboBox obj) { return (Style)obj.GetValue(LabelStyleProperty); }
public static string GetLabel(ComboBox obj) { return (string)obj.GetValue(LabelProperty); }
public static bool GetEnableWatermark(ComboBox obj) { return (bool)obj.GetValue(EnableWatermarkProperty); }
public static CharacterCasing GetCharacterCasing(ComboBox comboBox) { return (CharacterCasing)comboBox.GetValue(CharacterCasingProperty); }
/// <summary> /// Retrieves the <see cref="ICommand"/> attached to the <see cref="TextBox"/>. /// </summary> /// <param name="textBox">TextBox containing the Command dependency property</param> /// <returns>The value of the command attached</returns> public static ICommand GetCommand(ComboBox comboBox) { return comboBox.GetValue(CommandProperty) as ICommand; }
public static BindingBase GetDeferredSelectedValue(ComboBox obj) { return (BindingBase)obj.GetValue(DeferredSelectedValueProperty); }
public static int GetMaxLength(ComboBox comboBox) { return (int)comboBox.GetValue(MaxLengthProperty); }