Back to Devexpress

FilterNumericRangeSliderItem Class

maui-devexpress-dot-maui-dot-editors-76494011.md

latest6.1 KB
Original Source

FilterNumericRangeSliderItem Class

A filter item that allows you to filter data control items by numeric range values when a user changes range slider values.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
[DXLicenseMAUI]
public class FilterNumericRangeSliderItem :
    FilterNumericRangeItemBase

Remarks

The image below shows a sample numeric-range filter item:

To use a FilterNumericRangeSliderItem in your filtering UI, bind its Context property to the data control’s FilteringContext (DataGridView.FilteringContext or DXCollectionView.FilteringContext). Then specify the FilterNumericRangeSliderItem’s FieldName property to set by which data source property values the data control should filter its items:

xaml
<ContentPage ...
        xmlns:dx="http://schemas.devexpress.com/maui">
        <!--...-->
            <dx:FilterNumericRangeSliderItem 
                    FieldName="Price"
                    Context="{Binding}" 
                    Text="Price, $"

                    DisplayFormat="C"
                    HintDisplayFormat="Price Range: {0} - {1}"
                    HintTextColor="Purple"

                    TickmarkStep="200"
                    ValueStep="100"

                    EndTooltipShowMode="OnDrag"
                    StartTooltipShowMode="OnDrag"

                    ShowEditors="True" />
        <!--...-->
</ContentPage>
csharp
FilterPage FilterPage => filterPage ??= new FilterPage() { BindingContext = dataControl.FilteringContext };

Use Max and Min properties to limit the available filter range. If these property values are null, upper and lower range limits match maximum and minimum record values in the bound data source.

You can also replace the default editor with a custom editor. To do so, specify the FilterModelTemplate property. Use the FilterModel property to obtain the binding context for the template.

For more information on how to implement a Filtering UI for DataGridView and DXCollectionView, refer to the following sections:

Implements

Show 17 items

INotifyPropertyChanged

IAnimatable

Microsoft.Maui.Controls.ITabStopElement

IViewController

IVisualElementController

IElementController

IGestureController

IGestureRecognizers

IPropertyMapperView

IHotReloadableView

IView

IReplaceableView

ILayout

ILayoutController

Microsoft.Maui.IFrameworkElement

ITransform

IContainer

Inheritance

Show 13 items

System.Object BindableObject Element NavigableElement VisualElement View Layout DevExpress.Maui.Editors.Internal.BaseFormItem FormItemBase FilterFormItemBase FilterRangeItemBase FilterNumericRangeItemBase FilterNumericRangeSliderItem

Extension Methods

Yield<FilterNumericRangeSliderItem>()

YieldIfNotNull<FilterNumericRangeSliderItem>()

See Also

FilterNumericRangeSliderItem Members

DevExpress.Maui.Editors Namespace