ContentOperations.SetParent Method

Sets the parent element of the provided ContentElement.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public static void SetParent(
	ContentElement reference,
	DependencyObject parent
)

Parameters

reference
Type: System.Windows.ContentElement

The ContentElement to reparent.

parent
Type: System.Windows.DependencyObject

The new parent element.

Use this method to help define a ContentElement hosting and content model on a UIElement class. The DocumentViewerBase class uses this method internally to hook up its Document content property.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft