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>, Selector<T>?, Selector<T>?, bool, bool, TimeSpan?, ValidationObject?, int?, ZomboBoxKeyboardFocusLossBehaviour, Func<IEntityQuery<T>, string?, IEntityQuery<T>>?)
public EntitySelectorModel(ISurface surface, IOwnedValue<T?> boundLens, IEntityQuery<T> choices, Selector<T>? searchOverride, Selector<T>? createOverride, bool canSearch, bool canCreate, TimeSpan? searchDelay, ValidationObject? validator = null, int? maximumChoiceCount = null, ZomboBoxKeyboardFocusLossBehaviour keyboardFocusLossBehaviour = ZomboBoxKeyboardFocusLossBehaviour.AttemptSelection, Func<IEntityQuery<T>, string?, IEntityQuery<T>>? filterChoices = null)
Parameters
surfaceISurfaceboundLensIOwnedValue<T>choicesIEntityQuery<T>searchOverrideSelector<T>createOverrideSelector<T>canSearchboolcanCreateboolsearchDelayTimeSpan?validatorValidationObjectmaximumChoiceCountint?keyboardFocusLossBehaviourZomboBoxKeyboardFocusLossBehaviourfilterChoicesFunc<IEntityQuery<T>, string, IEntityQuery<T>>
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<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 T? Selection { get; set; }
Property Value
- T
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()