Gets the parent object of this FrameworkElement in the object tree.
Assembly: System.Windows (in System.Windows.dll)
may be Nothing in cases where an object was instantiated, but is not attached to an object that eventually connects to the Silverlight RootVisual, or the application object.
In the core Silverlight classes, the parent of a FrameworkElement can also be expected to be a FrameworkElement as long as it is not returned as Nothing. But custom classes might introduce a content model where this assumption is not true.
Note that the parent of an object can potentially change depending on your application's functionality, and keeping the value of this property as an instance will not reflect that change. You typically should get the parent object value immediately before you need it for other operations, and should not rely on the value past this point.
Note that this property is read-only. Changing the parent of an object can be accomplished, but is only done through manipulation of collections. For example, you can change a parent relationship by using dedicated add or remove methods, or through setting container properties of objects such as Children on a Panel.
Silverlight Tree Concepts and WPF
If you are familiar with WPF, you might know that WPF maintains several related tree concepts for programmatic access to the run-time object graph, such as a visual tree and a logical tree. In WPF, the Parent property reports the parent in the logical tree. Silverlight does not provide an API (equivalent of LogicalTreeHelper in WPF) that could provide concrete access to a logical tree, and therefore the Silverlight documentation does not devote a topic to explaining the logical tree concept to Silverlight programmers. However, the value reports on the logical tree result, to provide API equivalence to WPF. Generally, you can conceive of the logical tree as being a tree that describes containment through a nested series of objects and property values. If a given object has one or more contained children held in some type of "Content" or "Children" property, the describes the inverse of that relationship.
The value reported by the property in Silverlight is generally the same value that would be reported by using VisualTreeHelper API, because the two tree concepts are frequently synchronized as far as how parent-child relationships are reported. However, there may be cases where reports a parent that VisualTreeHelper does not.