Skip to content

CheckChoiceList

Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

The entries of a select field with check boxes that offers “All” or chosen items, nothing ticked meaning none: ticking All clears the items, ticking an item unticks All. CheckChoiceList.Summary is the text of the closed select.

public sealed class CheckChoiceList : ObservableObject

Inherits ObservableObject

CheckChoiceList(string allText, string noneText)

A list with the entry allText first (“All sites”); noneText while nothing is ticked.

CheckChoice All { get; }

The “All” entry.

bool AnyChosen { get; }

All, or at least one item, is ticked.

IReadOnlyList<object?> ChosenValues { get; }

The values of the ticked items (empty while All is ticked).

IReadOnlyList<CheckChoice> Entries { get; private set; }

All, then the items: the select’s ItemsSource.

IReadOnlyList<CheckChoice> Items { get; private set; }

The items after “All”.

string Summary { get; }

“All sites”, the ticked names (“Building B, Warehouse”) or the none text.

void Set(IEnumerable<CheckChoice> items, bool all, IEnumerable<object?> chosen)

Shows items and ticks All (all) or the items whose value is in chosen. Raises nothing.

event EventHandler? Changed

Raised after the user changed what is ticked.