Bagikan melalui


SelectionPolicy.GetPolicyItems Method

Returns the policy items from the specified selection.

Namespace:  Microsoft.Windows.Design.Policies
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Protected Overridable Function GetPolicyItems ( _
    selection As Selection _
) As IEnumerable(Of ModelItem)
protected virtual IEnumerable<ModelItem> GetPolicyItems(
    Selection selection
)
protected:
virtual IEnumerable<ModelItem^>^ GetPolicyItems(
    Selection^ selection
)
abstract GetPolicyItems : 
        selection:Selection -> IEnumerable<ModelItem> 
override GetPolicyItems : 
        selection:Selection -> IEnumerable<ModelItem> 
protected function GetPolicyItems(
    selection : Selection
) : IEnumerable<ModelItem>

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<ModelItem>
An enumeration of ModelItem objects to use for this policy.

Remarks

Override this method with policy logic to filter selection items.

The default behavior calls the IsInPolicy method for each item in the selection. Items for which IsInPolicy returns true are included in the returned enumeration.

.NET Framework Security

See Also

Reference

SelectionPolicy Class

Microsoft.Windows.Design.Policies Namespace

ItemPolicy

FeatureProvider

FeatureConnector<TFeatureProviderType>

Other Resources

Feature Providers and Feature Connectors

Understanding WPF Designer Extensibility