// Methods public static void AddLinkText(InlineCollection inlines, string text, HyperLinkObj obj) { Hyperlink item = new Hyperlink(new Run(text)) { Tag = obj }; inlines.Add(item); }
// Methods public static void AddLinkText(InlineCollection inlines, string text, HyperLinkObj obj) { Hyperlink item = new Hyperlink(new Run(text)) { Tag = obj }; inlines.Add(item); }
private void Hyperlink_Click(object sender, RoutedEventArgs e) { Hyperlink hyperlink = sender as Hyperlink; if (hyperlink != null) { HyperLinkObj tag = hyperlink.Tag as HyperLinkObj; if (tag != null) { if (tag is HyperLinkObj_Url) { HyperLinkObj_Url url = tag as HyperLinkObj_Url; BrowserHelper.OpenUrl(BrowserType.System, url.Url); } else { DebugLog.Assert(false, "响应未处理"); } } } }