Share via


AdornerLayout.IsAssociated Method

Gets a value indicating whether the specified model item is associated with this adorner.

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

Syntax

'Declaration
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

Parameters

Return Value

Type: System.Boolean
true if the adorner is associated with the specified model item.

Exceptions

Exception Condition
ArgumentNullException

adorner or item is nulla null reference (Nothing in Visual Basic).

Remarks

When a model item is removed from the document tree, DesignerView calls this method to check whether the adorner is using this item. If it is, DesignerView removes the adorner.

.NET Framework Security

See Also

Reference

AdornerLayout Class

Microsoft.Windows.Design.Interaction Namespace

AdornerPanel

PrimarySelectionAdornerProvider

Other Resources

Walkthrough: Creating a Design-time Adorner

Adorner Architecture