In WPF, I want to create a hyperlink that navigates to the details of an object, and I want the text of the hyperlink to be the name of the object. Right now, I have this:
<TextBlock><Hyperlink Command="local:MyCommands.ViewDetails" CommandParameter="{Binding}">Object Name</Hyperlink></TextBlock>
But I want "Object Name" to be bound to the actual name of the object. I would like to do something like this:
<TextBlock><Hyperlink Command="local:MyCommands.ViewDetails" CommandParameter="{Binding}" Text="{Binding Path=Name}"/></TextBlock>
However, the Hyperlink class does not have a text or content property that is suitable for data binding (that is, a dependency property).
Any ideas?