获取一个值,该值指示指定的模型项是否与此装饰器关联。
命名空间:  Microsoft.Windows.Design.Interaction
程序集:  Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)
语法
声明
Public MustOverride Function IsAssociated ( _
    adorner As UIElement, _
    item As ModelItem _
) As Boolean
public abstract bool IsAssociated(
    UIElement adorner,
    ModelItem item
)
public:
virtual bool IsAssociated(
    UIElement^ adorner, 
    ModelItem^ item
) abstract
abstract IsAssociated : 
        adorner:UIElement * 
        item:ModelItem -> bool 
public abstract function IsAssociated(
    adorner : UIElement, 
    item : ModelItem
) : boolean
参数
- adorner
 类型:System.Windows.UIElement
 要检查的装饰器。
- item
 类型:Microsoft.Windows.Design.Model.ModelItem
 要比较的项。
返回值
类型:System.Boolean
如果装饰器与指定的模型项关联,则为 true。
异常
| 异常 | 条件 | 
|---|---|
| ArgumentNullException | adorner 或 item 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 | 
备注
从文档树中移除模型项时,DesignerView 调用此方法以检查装饰器是否使用此项。 如果是,DesignerView 会移除装饰器。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
Microsoft.Windows.Design.Interaction 命名空间
PrimarySelectionAdornerProvider