<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Silverlight Controls and Silverlight Toolkit</title><link>http://forums.silverlight.net/forums/35.aspx</link><description>Discussions around using and developing Silverlight controls and the Silverlight Toolkit</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Get all parents of a Treeviewitem for a file browser</title><link>http://forums.silverlight.net/forums/thread/238611.aspx</link><pubDate>Sat, 27 Jun 2009 08:17:08 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:238611</guid><dc:creator>xkrja</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/238611.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=238611</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I solved it myself. I made a recursive method that looked like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;private void&lt;/span&gt; GetTreeViewHeader(TreeViewItem expanded)
        {
            TreeViewItem parent;

            &lt;span class="kwd"&gt;if&lt;/span&gt; (expanded.Parent &lt;span class="kwd"&gt;is&lt;/span&gt; TreeViewItem)
            {
                parent = (TreeViewItem)expanded.Parent;
                invertedPath += parent.Header.ToString() + &lt;span class="st"&gt;&amp;quot;#&amp;quot;&lt;/span&gt;;

                GetTreeViewHeader(parent);
            }
        }&lt;/pre&gt;&amp;nbsp; In this way I get the file path inverted but it&amp;#39;s easy to invert it to the real format by just splitting the string and putting it together backwards.&lt;br /&gt;</description></item><item><title>Get all parents of a Treeviewitem for a file browser</title><link>http://forums.silverlight.net/forums/thread/238517.aspx</link><pubDate>Fri, 26 Jun 2009 22:09:25 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:238517</guid><dc:creator>xkrja</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/238517.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=238517</wfw:commentRss><description>&lt;p&gt;I went through Justin&amp;#39;s tutorial about the TreeViewControl found here: &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://silverlight.net/blogs/justinangel/archive/2008/11/18/silverlight-toolkit-treeview-treeviewitem-amp-hierarchaldatatemplate.aspx" target="_blank"&gt;http://silverlight.net/blogs/justinangel/archive/2008/11/18/silverlight-toolkit-treeview-treeviewitem-amp-hierarchaldatatemplate.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I thought that I should use a modified version of the last part in the tutorial so that I can use the treeview for a file browser on the server. The thing is I need to get the file path whenever I click on a TreeViewItem (which will be a directory or file) in the treeview and to do that I must get all the parents of the node I just clicked, right? So, how can I loop through all parents of that treeViewItem so I can get the path?&lt;/p&gt;&lt;p&gt;If there is a better way to do this I&amp;#39;m open for suggestions.&lt;/p&gt;&lt;p&gt;Thanks! &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>