Class EntitySelectorModel<T>
public sealed class EntitySelectorModel<T> : ValidationObject, INotifyPropertyChanged, IDataErrorInfo where T : IEntity<T>
Type Parameters
T
- Inheritance
-
EntitySelectorModel<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
EntitySelectorModel(ISurface, IOwnedValue<T?>, IEntityQuery<T>?, EntitySelector<T>?, EntitySelector<T>?, bool, bool, TimeSpan?, ValidationObject?, int?, ZomboBoxKeyboardFocusLossBehaviour, FilterChoices<T>?)
[Obsolete("Use the constructor with an options parameter")]
public EntitySelectorModel(ISurface surface, IOwnedValue<T?> boundLens, IEntityQuery<T>? choices, EntitySelector<T>? searchOverride, EntitySelector<T>? createOverride, bool canSearch, bool canCreate, TimeSpan? searchDelay, ValidationObject? owner = null, int? maximumChoiceCount = null, ZomboBoxKeyboardFocusLossBehaviour keyboardFocusLossBehaviour = ZomboBoxKeyboardFocusLossBehaviour.AttemptSelection, FilterChoices<T>? filter = null)
Parameters
surfaceISurfaceboundLensIOwnedValue<T>choicesIEntityQuery<T>searchOverrideEntitySelector<T>createOverrideEntitySelector<T>canSearchboolcanCreateboolsearchDelayTimeSpan?ownerValidationObjectmaximumChoiceCountint?keyboardFocusLossBehaviourZomboBoxKeyboardFocusLossBehaviourfilterFilterChoices<T>
EntitySelectorModel(ISurface, IOwnedValue<T?>, EntitySelectorOptions<T>, ValidationObject?)
public EntitySelectorModel(ISurface surface, IOwnedValue<T?> boundLens, EntitySelectorOptions<T> options, ValidationObject? owner = null)
Parameters
surfaceISurfaceboundLensIOwnedValue<T>optionsEntitySelectorOptions<T>ownerValidationObject
Properties
CanClear
public bool CanClear { get; }
Property Value
CanCreate
public bool CanCreate { get; }
Property Value
CanSearch
public bool CanSearch { get; }
Property Value
DoClear
public ICommand DoClear { get; }
Property Value
DoCreate
public ICommand DoCreate { get; }
Property Value
DoSearch
public ICommand DoSearch { get; }
Property Value
DoUpdateChoices
public ICommand DoUpdateChoices { get; }
Property Value
FilteredChoices
public IReadOnlyCollection<EntitySelectorItem<T>>? FilteredChoices { get; set; }
Property Value
IsRequestingFocus
public bool IsRequestingFocus { get; set; }
Property Value
IsTextChanged
public bool IsTextChanged { set; }
Property Value
KeyboardFocusLossBehaviour
public ZomboBoxKeyboardFocusLossBehaviour KeyboardFocusLossBehaviour { get; }
Property Value
SearchDelay
public TimeSpan? SearchDelay { get; }
Property Value
SearchText
public string? SearchText { get; set; }
Property Value
Selection
Used for databinding - async void works on WPF dispatcher
[Obsolete("Use Get() and SetAsync()")]
public object? Selection { get; set; }
Property Value
Methods
Clear()
public void Clear()
GetAsync()
public Task<T?> GetAsync()
Returns
- Task<T>
ResetCanSearch()
public void ResetCanSearch()
SetAsync(T?)
public Task SetAsync(T? value)
Parameters
valueT
Returns
UpdateChoices()
public Task UpdateChoices()
Returns
Validate()
public override string? Validate()