c# - WinRt: How to add and remove links on RichEditBox? -



c# - WinRt: How to add and remove links on RichEditBox? -

i spent time on questions: how convert selection in richeditbox hyperlink , how remove link again.

the solution simple. there workarounds consider:

public void insertlink(richeditbox control, string url) { //check conditions - else property assignment crashes if (string.isnullorempty(url)) return; if (string.isnullorempty(control.document.selection.text)) return; control.document.selection.link = "\"" + url + "\""; } public void removelink(richeditbox control) { //can set link empty string, if link assigned, //else property assignment crashes if (string.isnullorempty(control.document.selection.link)) return; control.document.selection.link = ""; }

c# windows-runtime rtf uwp

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -