Class ZomboBox
Accepts text, optionally mapped to items with a filterable source.
public sealed class ZomboBox : ZomboBase, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild
- Inheritance
-
ZomboBox
- Implements
- Inherited Members
Remarks
The only limit is yourself.
Fields
AllowCustomTextProperty
public static readonly DependencyProperty AllowCustomTextProperty
Field Value
IsTextChangedProperty
public static readonly DependencyProperty IsTextChangedProperty
Field Value
KeyboardFocusLossBehaviourProperty
public static readonly DependencyProperty KeyboardFocusLossBehaviourProperty
Field Value
SelectedItemProperty
public static readonly DependencyProperty SelectedItemProperty
Field Value
SelectedTextProperty
public static readonly DependencyProperty SelectedTextProperty
Field Value
Properties
AllowCustomText
public bool AllowCustomText { get; set; }
Property Value
IsTextChanged
public bool IsTextChanged { get; set; }
Property Value
KeyboardFocusLossBehaviour
public ZomboBoxKeyboardFocusLossBehaviour KeyboardFocusLossBehaviour { get; set; }
Property Value
SelectedItem
public object? SelectedItem { get; set; }
Property Value
SelectedText
public string SelectedText { get; }
Property Value
Methods
ConfirmPendingSelection()
Called when Enter is pressed to confirm the current selection/text.
protected override void ConfirmPendingSelection()
HandleFocusLoss()
Called when the control loses keyboard focus.
protected override void HandleFocusLoss()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.GotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
eKeyboardFocusChangedEventArgsThe KeyboardFocusChangedEventArgs that contains the event data.
OnItemSelected(ZomboBoxItem)
Called when an item is selected via click or keyboard.
protected override void OnItemSelected(ZomboBoxItem item)
Parameters
itemZomboBoxItem
OnTextChangedInternal()
Called when text changes while focused. Override to track text change state.
protected override void OnTextChangedInternal()
SelectItem(ZomboBoxItem?)
public void SelectItem(ZomboBoxItem? zbi)
Parameters
zbiZomboBoxItem
SelectText(string)
public void SelectText(string text)
Parameters
textstring
Events
SelectedItemChanged
public event EventHandler<SelectedItemChangedEventArgs>? SelectedItemChanged