Skip to main content

FilterField.Caption Property

Gets or sets the field’s display text.

Namespace: DevExpress.Xpf.Core.FilteringUI

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public object Caption { get; set; }

Property Value

Type Description
Object

The field’s display text.

Remarks

Run Demo: FilterBehavior - Standalone Filter Editor

The following code sample shows how to use the FilterBehavior to make the Filter Editor work with the ChartControl.

<Button Name="ApplyFilterButton" Content="Apply Filter"
        Command="{Binding Commands.ApplyFilter, ElementName=filterEditor}"/>
<!-- -->
<dxfui:FilterEditorControl x:Name="filterEditor">
    <dxmvvm:Interaction.Behaviors>
        <dxfui:FilterBehavior x:Name="filterBehavior" 
                              FilterString="[Year] >= 2014 And Sales > 1"
                              ItemsSource="{Binding ElementName=chart, Path=DataSource}">
            <dxfui:FilterField FieldName="Company"/>
            <dxfui:FilterField FieldName="Year"/>
            <dxfui:FilterField FieldName="Sales" Caption="Sales, millions of USD"/>
            <dxfui:FilterField FieldName="Charges" Caption="Charges, millions of USD"/>
        </dxfui:FilterBehavior>
    </dxmvvm:Interaction.Behaviors>
</dxfui:FilterEditorControl> 
<!-- -->
<dxc:ChartControl Name="chart" DataSource="{Binding Sales}">
    <dxc:XYDiagram2D SeriesDataMember="Company">
        <!-- -->
        <dxc:XYDiagram2D.SeriesTemplate>
            <dxc:BarFullStackedSeries2D Name="seriesTemplate"
                ArgumentDataMember="Year" ValueDataMember="Sales"
                FilterCriteria="{Binding ElementName=filterBehavior, Path=ActualFilterCriteria}">
            </dxc:BarFullStackedSeries2D>
        </dxc:XYDiagram2D.SeriesTemplate>
    </dxc:XYDiagram2D>
</dxc:ChartControl>   
See Also