I have a WPF Hyperlink
which I'm trying to get the text content from.
For example:
<Hyperlink Command="{Binding CustomersCommand}" Name="HLCustomers">
Customers
</Hyperlink>
This is not possible using the usual manner of accessing a Text
property or using VisualTreeHelper
to get some child text element, since Hyperlink
is not a visual element. I tried to get the text from FirstInline
but this also doesn't give me the text.
How would I get the value "Customers" from the Hyperlink
element in the above example at runtime?