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
- context
Type: Microsoft.Windows.Design.EditingContext
The editing context to use.
- parent
Type: Microsoft.Windows.Design.Model.ModelItem
The parent.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Model Namespace