在wpf C#中构造超链接

fad*_*fad 2 c# wpf

如何在c#编码中的超链接中插入TextBlock控件.类似于 <TextBlock> <Hyperlink>a</Hyperlink></textblockC#.我无法在Hyperlink中找到内容属性.提前致谢.

Hun*_*hpu 7

尝试使用Inlines将超链接添加到TextBlock并将文本添加到HyperLink

TextBlock textBlock = new TextBlock();
Hyperlink link = new Hyperlink();
link.Inlines.Add("Click me");
textBlock.Inlines.Add(link);
Run Code Online (Sandbox Code Playgroud)