Class FilterControl
A control to filter an ICollectionView.
Inheritance
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TemplatePart(Name = "PART_ResetAllButton", Type = typeof(Button))]
[TemplatePart(Name = "PART_HideButton", Type = typeof(ToggleButton))]
public class FilterControl : Control, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient
Constructors
View SourceFilterControl()
Creates a new instance of the FilterControl class.
Declaration
public FilterControl()
Fields
View SourceCollapsedWidthProperty
Defines the dependency property of the CollapsedWidth property.
Declaration
public static readonly DependencyProperty CollapsedWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EditFilterListButtonToolTipProperty
Defines the dependency property of the EditFilterListButtonToolTip property.
Declaration
public static readonly DependencyProperty EditFilterListButtonToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FavoriteSelectionHeaderProperty
Defines the dependency property of the FavoriteSelectionHeader property.
Declaration
public static readonly DependencyProperty FavoriteSelectionHeaderProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FavoritesProperty
Defines the dependency property of the Favorites property.
Declaration
public static readonly DependencyProperty FavoritesProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FilterCountProperty
Defines the dependency property of the FilterCount property.
Declaration
public static readonly DependencyProperty FilterCountProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FilterFavoritesCloseButtonToolTipProperty
Defines the dependency property of the FilterFavoritesCloseButtonToolTip property. EditFilterList
Declaration
public static readonly DependencyProperty FilterFavoritesCloseButtonToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FilterSelectionCountDisplayProperty
Defines the dependency property of the FilterSelectionCountDisplay property.
Declaration
public static readonly DependencyProperty FilterSelectionCountDisplayProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FilterSelectionHeaderProperty
Defines the dependency property of the FilterSelectionHeader property.
Declaration
public static readonly DependencyProperty FilterSelectionHeaderProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FiltersProperty
Defines the dependency property of the Filters property.
Declaration
public static readonly DependencyProperty FiltersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
FiltersSelectionCloseButtonToolTipProperty
Defines the dependency property of the FiltersSelectionCloseButtonToolTip property.
Declaration
public static readonly DependencyProperty FiltersSelectionCloseButtonToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HeaderProperty
Defines the dependency property of the Header property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HeaderToggleButtonToolTipProperty
Defines the dependency property of the HeaderToggleButtonToolTip property.
Declaration
public static readonly DependencyProperty HeaderToggleButtonToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsCollapsedProperty
Defines the dependency property of the IsCollapsed property.
Declaration
public static readonly DependencyProperty IsCollapsedProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsFavoriteSelectionPopupOpenProperty
Defines the dependency property of the IsFavoriteSelectionPopupOpen property.
Declaration
public static readonly DependencyProperty IsFavoriteSelectionPopupOpenProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsFilterSelectionEnabledProperty
Defines the dependency property of the IsFilterSelectionEnabled property.
Declaration
public static readonly DependencyProperty IsFilterSelectionEnabledProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsFilterSelectionPopupOpenProperty
Defines the dependency property of the IsFilterSelectionPopupOpen property.
Declaration
public static readonly DependencyProperty IsFilterSelectionPopupOpenProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ItemsSourceProperty
Defines the dependency property of the ItemsSource property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MaxVisibleFiltersProperty
Defines the dependency property of the MaxVisibleFilters property.
Declaration
public static readonly DependencyProperty MaxVisibleFiltersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
NumberOfFilteredRecordsTextPrefixProperty
Defines the dependency property of the NumberOfFilteredRecordsTextPrefix property.
Declaration
public static readonly DependencyProperty NumberOfFilteredRecordsTextPrefixProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
OpenFavoriteSelectionButtonToolTipProperty
Defines the dependency property of the OpenFavoriteSelectionButtonToolTip property.
Declaration
public static readonly DependencyProperty OpenFavoriteSelectionButtonToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ResetAllFiltersProperty
Defines the dependency property of the ResetAllFilters property.
Declaration
public static readonly DependencyProperty ResetAllFiltersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ResetButtonLocationProperty
Defines the dependency property of the ResetButtonLocation property.
Declaration
public static readonly DependencyProperty ResetButtonLocationProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ResetButtonTextProperty
Defines the dependency property of the ResetButtonText property.
Declaration
public static readonly DependencyProperty ResetButtonTextProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ResetButtonToolTipProperty
Defines the dependency property of the ResetButtonToolTip property.
Declaration
public static readonly DependencyProperty ResetButtonToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SaveAsFavoriteButtonToolTipProperty
Defines the dependency property of the SaveAsFavoriteButtonToolTip property.
Declaration
public static readonly DependencyProperty SaveAsFavoriteButtonToolTipProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SaveAsFavoriteDialogFavoriteNameProperty
Defines the dependency property of the SaveAsFavoriteDialogFavoriteName property.
Declaration
public static readonly DependencyProperty SaveAsFavoriteDialogFavoriteNameProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SaveAsFavoriteDialogTitleProperty
Defines the dependency property of the SaveAsFavoriteDialogTitle property.
Declaration
public static readonly DependencyProperty SaveAsFavoriteDialogTitleProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
VisibleFiltersProperty
Declaration
public static readonly DependencyProperty VisibleFiltersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
View SourceCollapsedWidth
Gets or sets the width of the filter control for the collapsed state.
Declaration
public double CollapsedWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
EditFilterListButtonToolTip
Gets or sets the tooltip for the edit filters list button.
Declaration
public string EditFilterListButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FavoriteSelectionHeader
Gets or sets the header of the favorite selection.
Declaration
public string FavoriteSelectionHeader { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Favorites
Gets the list of FilterFavorite.
Declaration
public ObservableCollection<FilterFavorite> Favorites { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<FilterFavorite> |
FilterCount
Gets the filter count.
Declaration
public int FilterCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
FilterFavoritesCloseButtonToolTip
Gets or sets the tooltip for close button of the filters favorites dialog.
Declaration
public string FilterFavoritesCloseButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FilterSelectionCountDisplay
Gets the display count of the filter selection.
Declaration
public string FilterSelectionCountDisplay { get; }
Property Value
| Type | Description |
|---|---|
| string |
FilterSelectionHeader
Gets the header text of the filter selection.
Declaration
public string FilterSelectionHeader { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Filters
Gets the ObservableCollection<T> of filters.
Declaration
[SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Can be used as dependency property in Xaml.")]
public ObservableCollection<FilterControlFilter> Filters { get; set; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<FilterControlFilter> |
FiltersSelectionCloseButtonToolTip
Gets or sets the tooltip for close button of the filters selection dialog.
Declaration
public string FiltersSelectionCloseButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Header
Gets or sets the header.
Declaration
public string Header { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HeaderToggleButtonToolTip
Gets or sets the tooltip of the filter control header toggle button.
Declaration
public string HeaderToggleButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsCollapsed
Gets or sets a flag to define whether the filter is in the collapsed state or not.
Declaration
public bool IsCollapsed { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsFavoriteSelectionPopupOpen
Indicates whether the favorite selection popup is open.
Declaration
public bool IsFavoriteSelectionPopupOpen { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsFilterSelectionEnabled
Indicates whether additional filters can be selected.
Declaration
public bool IsFilterSelectionEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsFilterSelectionPopupOpen
Indicates whether the filter selection is open.
Declaration
public bool IsFilterSelectionPopupOpen { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ItemsSource
Gets or sets the items source.
Declaration
public ICollectionView ItemsSource { get; set; }
Property Value
| Type | Description |
|---|---|
| ICollectionView |
MaxVisibleFilters
Gets or sets the maximum number of visible filters.
Declaration
public int MaxVisibleFilters { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
NumberOfFilteredRecordsTextPrefix
Gets or sets the text prefix for the number of filtered records currently displayed.
Declaration
public string NumberOfFilteredRecordsTextPrefix { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
OpenFavoriteSelectionButtonToolTip
Gets or sets the tooltip for the open favorite selection button.
Declaration
public string OpenFavoriteSelectionButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ResetAllFilters
Gets the reset all filters Command.
Declaration
public DelegateCommand ResetAllFilters { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
ResetButtonLocation
Gets or sets the location of the "reset all filters" button.
Declaration
public FilterResetAllButtonLocation ResetButtonLocation { get; set; }
Property Value
| Type | Description |
|---|---|
| FilterResetAllButtonLocation |
ResetButtonText
Gets or sets the display text of the reset button.
Declaration
public string ResetButtonText { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ResetButtonToolTip
Gets or sets the tooltip for the reset all filters button.
Declaration
public string ResetButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SaveAsFavoriteButtonToolTip
Gets or sets the tooltip for the 'SaveAsFavorite' button.
Declaration
public string SaveAsFavoriteButtonToolTip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SaveAsFavoriteDialogFavoriteName
Gets or sets the caption for field "favorite name'.
Declaration
public string SaveAsFavoriteDialogFavoriteName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SaveAsFavoriteDialogTitle
Gets or sets the caption for field "favorite name'.
Declaration
public string SaveAsFavoriteDialogTitle { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
VisibleFilters
Declaration
public int VisibleFilters { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceDeferFilterApply(bool)
Defers the filter update until the returned IDisposable has been disposed.
Declaration
public IDisposable DeferFilterApply(bool defer = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | defer | If |
Returns
| Type | Description |
|---|---|
| IDisposable | An IDisposable that will enable filter changes and will update all outstanding filter changes when disposed. |
GetFilterCount(UIElement)
Gets the filter count.
Declaration
public static int GetFilterCount(UIElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element |
Returns
| Type | Description |
|---|---|
| int |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
Declaration
public override void OnApplyTemplate()
Overrides
View SourceSetFilterCount(UIElement, int)
Sets the filter count.
Declaration
public static void SetFilterCount(UIElement element, int value)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element | |
| int | value |
Events
View SourceItemsSourceFiltering
Invoked when the ItemsSource is filtered.
Declaration
public event EventHandler<ItemsSourceFilteringEventArgs> ItemsSourceFiltering
Event Type
| Type | Description |
|---|---|
| EventHandler<ItemsSourceFilteringEventArgs> |
SaveAsFavoriteClick
Invoked when the save as favorite button is clicked.
Declaration
public event SaveAsFavoriteClickEventHandler SaveAsFavoriteClick
Event Type
| Type | Description |
|---|---|
| SaveAsFavoriteClickEventHandler |