更新:2007 年 11 月
返回指定选定内容中的策略项。
命名空间: Microsoft.Windows.Design.Policies
程序集: Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)
语法
声明
Protected Overridable Function GetPolicyItems ( _
selection As Selection _
) As IEnumerable(Of ModelItem)
用法
Dim selection As Selection
Dim returnValue As IEnumerable(Of ModelItem)
returnValue = Me.GetPolicyItems(selection)
protected virtual IEnumerable<ModelItem> GetPolicyItems(
Selection selection
)
protected:
virtual IEnumerable<ModelItem^>^ GetPolicyItems(
Selection^ selection
)
protected function GetPolicyItems(
selection : Selection
) : IEnumerable<ModelItem>
参数
selection
类型:Microsoft.Windows.Design.Interaction.Selection当前选定内容。
返回值
类型:System.Collections.Generic.IEnumerable<ModelItem>
用于此策略的 ModelItem 对象的枚举。
备注
用策略逻辑重写此方法以筛选选择项。
默认行为为选定内容中的每一项调用 IsInPolicy 方法。IsInPolicy 为其返回 true 的项包含在返回的枚举中。
权限
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
另请参见
参考
Microsoft.Windows.Design.Policies 命名空间
FeatureConnector<TFeatureProviderType>