Share via


FilterRulePanel Class

Definition

The FilterRulePanel allows users to construct and display a complex query built using FilterRules.

public ref class FilterRulePanel : System::Windows::Controls::Control, Microsoft::Management::UI::Internal::IFilterExpressionProvider
public class FilterRulePanel : System.Windows.Controls.Control, Microsoft.Management.UI.Internal.IFilterExpressionProvider
type FilterRulePanel = class
    inherit Control
    interface IFilterExpressionProvider
Public Class FilterRulePanel
Inherits Control
Implements IFilterExpressionProvider
Inheritance
FilterRulePanel
Implements

Remarks

The FilterRulePanel manages two primary entities: FilterRulePanelItems and DataTemplates. ///

FilterRulePanelItems are the data classes that store the state for each item in the panel. They are added and removed to/from the panel using the AddRulesCommand and the RemoveRuleCommand commands.

For a FilterRule to display in the panel it must have a DataTemplate registered. To add and remove DataTemplates, use the AddFilterRulePanelItemContentTemplate and RemoveFilterRulePanelItemContentTemplate methods.

Constructors

FilterRulePanel()

Initializes a new instance of the FilterRulePanel class.

Fields

AddRulesCommand

Adds a collection of FilterRules to the panel.

RemoveRuleCommand

Removes a FilterRulePanelItem from the panel.

Properties

Controller

Gets the FilterRulePanelController associated with this FilterRulePanel.

FilterExpression

Gets a FilterExpression representing the current relational organization of FilterRules for this provider.

FilterRulePanelItems

Gets the collection of FilterRulePanelItems that are currently displayed in the panel.

FilterRuleTemplateSelector

Gets a FilterRuleTemplateSelector that stores the templates used for items in the panel.

HasFilterExpression

Gets a value indicating whether this provider currently has a non-empty filter expression.

Methods

AddFilterRulePanelItemContentTemplate(Type, DataTemplate)

Associates a DataTemplate with a Type so that objects of that Type that are displayed in FilterRulePanel use the specified DataTemplate.

ClearContentTemplates()

Removes all the registered content templates.

NotifyFilterExpressionChanged()

Notifies any listeners that the filter expression has changed.

OnAddRulesExecuted(ExecutedRoutedEventArgs)

Called when AddRules executes.

OnCreateAutomationPeer()

Create an instance of the AutomationPeer.

OnRemoveRuleExecuted(ExecutedRoutedEventArgs)

Called when RemoveRule executes.

RemoveFilterRulePanelItemContentTemplate(Type)

Removes the Type and associated DataTemplate from usage when displaying objects of that type in the FilterRulePanel.

TryGetContentTemplate(Type, DataTemplate)

Gets a DataTemplate associated with a type.

Events

FilterExpressionChanged

Raised when a FilterRulePanelItem has been added or removed.

Applies to