Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Redirect a reference from one parent to another. .
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Overridable Function RedirectParent ( _
parent As ModelItem, _
childType As Type _
) As ModelItem
public virtual ModelItem RedirectParent(
ModelItem parent,
Type childType
)
public:
virtual ModelItem^ RedirectParent(
ModelItem^ parent,
Type^ childType
)
abstract RedirectParent :
parent:ModelItem *
childType:Type -> ModelItem
override RedirectParent :
parent:ModelItem *
childType:Type -> ModelItem
public function RedirectParent(
parent : ModelItem,
childType : Type
) : ModelItem
Parameters
- parent
Type: Microsoft.Windows.Design.Model.ModelItem
The parent item.
- childType
Type: System.Type
The type of child item.
Return Value
Type: Microsoft.Windows.Design.Model.ModelItem
A redirected parent. The default implementation returns parent.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | parent or childType is nulla null reference (Nothing in Visual Basic). |
Remarks
Locating a parent generally flows from the selected object upward until an appropriate parent is found. For some scenarios, an element may want to redirect this ___location process to another element. For example, a ContentControl can be the parent of only a single element. If the ContentControl already contains a Panel and the user adds a new object, the user's intent is most likely to add new objects to the Panel. This method allows that form of redirection.
.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