取得值,表示指定的模型項目是否與這個裝飾項相關聯。
命名空間: 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