XObject.Parent Property
Namespace: System.Xml.Linq
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
The following example uses this method.
StringBuilder output = new StringBuilder(); XDocument doc = new XDocument( new XComment("A comment in the document."), new XElement("Root", new XElement("Child", "content") ) ); XElement child = doc.Descendants("Child").First(); XElement root = child.Parent; output.Append(root.Name + Environment.NewLine); OutputTextBlock.Text = output.ToString();
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Note: