Skip to content

FilterKind

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

One kind of filter of a list (SDK 0.17.0, FilterSet): its name in the Filter menu (“Country”), the text of its chip (“Country: Austria”), whether it is set, its editor (any object; the page gives it a DataTemplate, the chip shows it in a flyout) and how to clear it. The page calls FilterKind.Refresh when the filter’s value changed.

public sealed class FilterKind : ObservableObject

Inherits ObservableObject

FilterKind(string name, object editor, Func<bool> isSet, Func<string> text, Action clear)

Parameters

  • name: The entry of the Filter menu.
  • editor: What the chip’s flyout shows (a view model the page has a DataTemplate for).
  • isSet: Whether the filter narrows the list now.
  • text: The chip’s text (“Country: Austria”, “Last 24 hours”).
  • clear: Sets the filter back to everything.
object Editor { get; }

What the chip’s flyout shows: a view model the page gives a DataTemplate.

bool IsSet { get; private set; }

Whether the filter narrows the list now; a set filter shows its chip.

string Name { get; }

The entry of the Filter menu (“Country”).

string Text { get; private set; }

The chip’s text (“Country: Austria”), kept up to date by Refresh.

void Refresh()

The filter’s value changed: the chip’s text and state follow.

void RequestClose()

Closes the chip’s editor, e.g. after a choice that applies at once.

event EventHandler? CloseRequested

The page asks to close the chip’s editor (a choice that applies at once).

event EventHandler? Opening

The chip’s editor opens (the page fills it, e.g. a date range with today).