ModelParent.CanParent Method

Determines if the specified type can be the parent of the specified child type.

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

Syntax

'Declaration
Public Shared Function CanParent ( _
    context As EditingContext, _
    parent As ModelItem, _
    childType As Type _
) As Boolean
public static bool CanParent(
    EditingContext context,
    ModelItem parent,
    Type childType
)
public:
static bool CanParent(
    EditingContext^ context, 
    ModelItem^ parent, 
    Type^ childType
)
static member CanParent : 
        context:EditingContext * 
        parent:ModelItem * 
        childType:Type -> bool 
public static function CanParent(
    context : EditingContext, 
    parent : ModelItem, 
    childType : Type
) : boolean

Parameters

  • childType
    Type: System.Type
    The type of item you wish to parent.

Return Value

Type: System.Boolean
true if the specified parent item can accept instances of childType as a child; otherwise, false.

Remarks

This method returns true if the specified parent item can accept a childType type as a child. If this method returns true, a subsequent call to the Parent method will set parent as the parent of childType.

.NET Framework Security

See Also

Reference

ModelParent Class

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility Architecture