Silverlight / WPF - How to display hyperlink on right side panel of PivotViewer?
Asked By Prasanna Belsare on 17-Jul-13 09:06 AM
Hi,
I have used Pivotviewer control in silverlight application. I want to display hyperlink on the right side panel of Pivotviewer.
I tried following in PivotViewerItemTemplate:
<HyperlinkButton NavigateUri="{Binding myurl, Converter={StaticResource urlconv}}"/>
But it displays as a text value, and not working as a hyperlink.
I also tried to use PivotViewerLinkProperty to display link on pivotviewer item. But, pivotviewer display nothing after adding it. Code is as follows:
<sdk:PivotViewerLinkProperty
Id="myurl"
Options="None"
DisplayName="Assess Me"
Binding="{Binding myurl, Converter={StaticResource urlconv}}"/>
Or is there any other way to display hyperlink for each pivotviewer item?
Robbe Morris replied to Prasanna Belsare on 17-Jul-13 12:13 PM
Where is the click event on the Hyperlinkbutton? This looks like you are only setting a property value.
I looked up some really old Silverlight code and found that I bound the Url to the .Tag property of the HyperlinkButton. Then, in the click event handler, performed the navigation using the .Tag property cast to a string.
There may be better ways to do it in current versions of Silverlight.