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
- selection
Type: Microsoft.Windows.Design.Interaction.Selection
The current selection.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Policies Namespace
FeatureConnector<TFeatureProviderType>