开发者

TreeView Menu with hyperlinks in Silverlight

开发者 https://www.devze.com 2023-03-02 08:32 出处:网络
I\'ve made a search in Google but not found any sample with a TreeView menu with hyperlinks like on MSDN site.

I've made a search in Google but not found any sample with a TreeView menu with hyperlinks like on MSDN site.

by eg. I have

<controls:TreeView>
    <controls:TreeViewItem Header="Home">
        <controls:TreeViewItem Header="Services"/>开发者_开发百科
        <controls:TreeViewItem Header="About"/>

How can I associate menu items with links on the site? Should I manage "Selected" event to reset the ContentFrame Source to the linked URL?


did you try changing the template of the Header? here's a sample:

<Controls:TreeView>
    <Controls:TreeViewItem>
        <Controls:TreeViewItem.Header>
            <HyperlinkButton Content="About" NavigateUri="/About"/>
        </Controls:TreeViewItem.Header>
    </Controls:TreeViewItem>
</Controls:TreeView>

Hope this helps ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号