Click to Rate and Give Feedback
MSDN
MSDN Library
GetParent Method

Gets the parent object of the calling object.

XAML
Cannot use methods in XAML.
Scripting
retval = object.GetParent()

Return Value

object

A reference to the specified parent object if successful; otherwise, returns null.

Remarks

The only objects that can contain UIElement children are Canvas or InkPresenter. Path can have child elements, but these are geometries rather than UIElements.

Applies To

Canvas, Ellipse, Glyphs, Image, InkPresenter, Line, MediaElement, Path, Polygon, Polyline, Rectangle, TextBlock

See Also

Referencing and Modifying Silverlight Objects
FindName
GetHost

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker