c# - Wpf Dynamically set Hyperlinks for e-mails and links -
i've got application shows list of messages shown textbox:
<textbox text="{binding ., converter={staticresource messagetextconverter}}" borderthickness="0" background="transparent" isreadonly="true" fontsize="14" textwrapping="wrap" verticalalignment="stretch"/> those messages may or may not contain link or email. needed way dynamically check text links , emails , set hyperlinks in textbox.
i searched online , not find similar case. best way this? using regex?
edit:
some people marked duplicated of c# wpf text links , question showing hyperlink , making clickable. knew , how use it. question is, best way check random text link or email , mark it.
example of entries o text:
entry 1: "some text before url http://www.google.com" entry 2: "http://www.google.com text has nothing url" entry 3: "some text before url http://www.google.com text after url" entry 4: "some text before urls http://www.google.com text between urls http://www.google.com text after urls" in resume, given random text may contain url in middle, best way separate chunk of url , highlight it? using regex? or there way in wpf easier?
Comments
Post a Comment