ParentAdapter.Parent Method (ModelItem, ModelItem, Int32)
Changes the parent of an object to another parent.
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Overridable Sub Parent ( _
newParent As ModelItem, _
child As ModelItem, _
insertionIndex As Integer _
)
public virtual void Parent(
ModelItem newParent,
ModelItem child,
int insertionIndex
)
public:
virtual void Parent(
ModelItem^ newParent,
ModelItem^ child,
int insertionIndex
)
abstract Parent :
newParent:ModelItem *
child:ModelItem *
insertionIndex:int -> unit
override Parent :
newParent:ModelItem *
child:ModelItem *
insertionIndex:int -> unit
public function Parent(
newParent : ModelItem,
child : ModelItem,
insertionIndex : int
)
Parameters
- newParent
Type: Microsoft.Windows.Design.Model.ModelItem
The new parent item for the child.
- child
Type: Microsoft.Windows.Design.Model.ModelItem
The child item.
- insertionIndex
Type: System.Int32
The order of control in the children collection.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | newParent or child is nulla null reference (Nothing in Visual Basic). |
Remarks
Use the Parent method to set up parent-child relationships.
.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.Interaction Namespace