Skip to content

FilterSet

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

The filters of a list as chips (SDK 0.17.0; License Plate Center’s log): the Filter button (FilterButton) lists the kinds; choosing one adds its chip to the row below the toolbar (FilterBar) and opens its editor; a chip’s text opens its editor again, its x clears the filter and removes the chip; Clear filters clears them all. The row exists only while a chip is shown. A chip whose editor closes without a value goes away.

public sealed class FilterSet : ObservableObject

Inherits ObservableObject

FilterSet(IReadOnlyList<FilterKind> kinds, Action? clearAll = null)

Parameters

  • kinds: The kinds in the Filter menu’s order.
  • clearAll: Clears every filter at once (one read of the list); null: each kind clears itself.
IRelayCommand<FilterKind> AddCommand { get; }

A filter of the Filter menu: its chip shows and its editor opens.

IRelayCommand ClearCommand { get; }

Clear filters: every filter cleared, every chip gone.

bool HasShown { get; }

The chip row shows.

IReadOnlyList<FilterKind> Kinds { get; }

Every kind, in the Filter menu’s order.

IRelayCommand<FilterKind> RemoveCommand { get; }

The x of a chip: the filter is cleared, the chip goes.

ObservableCollection<FilterKind> Shown { get; }

The chips, in the order they were added.

void Add(FilterKind? kind)

Shows the chip of kind (the Filter menu’s entry) and asks to open its editor.

void EditorClosed(FilterKind kind)

A chip’s editor closed: a chip without a value goes away.

void Remove(FilterKind? kind)

Removes the chip of kind and sets its filter back to everything.

event EventHandler<FilterKind>? OpenRequested

A chip’s editor is to open (after Add); the bar opens it.