开发者

Preventing Hyperlink inside WPF RichTextbox from being edited by end user

I am having a WPf hyperlink inside a WPf Richtextbox , clicking on hyperlink results in opening of a popup. But i wish to prevent the editing of hyperlink text.

Initially it looks like below

Preventing Hyperlink inside WPF RichTextbox from being edited by end user

but when user edits the hyperlink it looks like this

Preventing Hyperlink inside WPF RichTextbox from being edited by end user

So I wish to prevent this editing o开发者_高级运维f hyerlink.


If you add in a container it cannot be edited (but removed as a whole):

<InlineUIContainer>
    <TextBlock>
        <Hyperlink NavigateUri="http://www.google.com/">
            <Run Text="Google"/>
        </Hyperlink>
    </TextBlock>
</InlineUIContainer>

Would this be any good?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜