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>?, 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

surface ISurface
boundLens IOwnedValue<T>
choices IEntityQuery<T>
searchOverride EntitySelector<T>
createOverride EntitySelector<T>
canSearch bool
canCreate bool
searchDelay TimeSpan?
owner ValidationObject
maximumChoiceCount int?
keyboardFocusLossBehaviour ZomboBoxKeyboardFocusLossBehaviour
filter FilterChoices<T>

EntitySelectorModel(ISurface, IOwnedValue<T?>, EntitySelectorOptions<T>, ValidationObject?)

public EntitySelectorModel(ISurface surface, IOwnedValue<T?> boundLens, EntitySelectorOptions<T> options, ValidationObject? owner = null)

Parameters

surface ISurface
boundLens IOwnedValue<T>
options EntitySelectorOptions<T>
owner ValidationObject

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<EntitySelectorItem<T>>? FilteredChoices { get; set; }

Property Value

IReadOnlyCollection<EntitySelectorItem<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 object? Selection { get; set; }

Property Value

object

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