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

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

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