Table of Contents

Class EntitySelectorModel<T>

Namespace
The.WPF.Fields
Assembly
Instagile.WPF.dll
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

surface ISurface
boundLens IOwnedValue<T>
choices IEntityQuery<T>
searchOverride Selector<T>
createOverride Selector<T>
canSearch bool
canCreate bool
searchDelay TimeSpan?
validator ValidationObject
maximumChoiceCount int?
keyboardFocusLossBehaviour ZomboBoxKeyboardFocusLossBehaviour
filterChoices Func<IEntityQuery<T>, string, IEntityQuery<T>>

Properties

CanClear

public bool CanClear { get; }

Property Value

bool

CanCreate

public bool CanCreate { get; }

Property Value

bool

CanSearch

public bool CanSearch { get; }

Property Value

bool

DoClear

public ICommand DoClear { get; }

Property Value

ICommand

DoCreate

public ICommand DoCreate { get; }

Property Value

ICommand

DoSearch

public ICommand DoSearch { get; }

Property Value

ICommand

DoUpdateChoices

public ICommand DoUpdateChoices { get; }

Property Value

ICommand

FilteredChoices

public IReadOnlyCollection<T>? FilteredChoices { get; set; }

Property Value

IReadOnlyCollection<T>

IsRequestingFocus

public bool IsRequestingFocus { get; set; }

Property Value

bool

IsTextChanged

public bool IsTextChanged { set; }

Property Value

bool

KeyboardFocusLossBehaviour

public ZomboBoxKeyboardFocusLossBehaviour KeyboardFocusLossBehaviour { get; }

Property Value

ZomboBoxKeyboardFocusLossBehaviour

SearchDelay

public TimeSpan? SearchDelay { get; }

Property Value

TimeSpan?

SearchText

public string? SearchText { get; set; }

Property Value

string

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

value T

Returns

Task

UpdateChoices()

public Task UpdateChoices()

Returns

Task

Validate()

public override string? Validate()

Returns

string