c# - How to get Run's text inside a Hyperlink? -
this xaml markup:
<textblock> <hyperlink click="instrumentfile_click"> <run text="{binding instrumentfile}"/> </hyperlink> </textblock>
c#:
private void instrumentfile_click(object sender, routedeventargs e) { hyperlink link = sender hyperlink; if (link != null) { //need text here } }
i want text bound run. how can get? thanks!
it's silly situation. you've written class instrumentfile member, , bound view. want programmatically access view in order data gave in first place? it's backwards!
just access instrumentfile member directly. wrote code in first place!
Comments
Post a Comment