public static Hyperlink GenerateHyperlink(string text, string tag, Action <Hyperlink, string> clickedCallback, Brush foregroundBrush = null) { Hyperlink h = new Hyperlink(); HyperlinkHelper.SetState(h, HyperlinkState.Normal, foregroundBrush); h.Inlines.Add((Inline) new Run() { Text = text }); h.Click += (RoutedEventHandler)((s, e) => clickedCallback(h, tag)); return(h); }
public static Hyperlink GenerateHyperlink(string text, string tag, Action <Hyperlink, string> clickedCallback, Brush foregroundBrush = null, HyperlinkState hyperlinkState = HyperlinkState.Normal) { Hyperlink h = new Hyperlink(); HyperlinkHelper.SetState(h, hyperlinkState, foregroundBrush); PresentationFrameworkCollection <Inline> arg_44_0 = h.Inlines; Run expr_3D = new Run(); expr_3D.Text = (text); arg_44_0.Add(expr_3D); h.Click += (delegate(object s, RoutedEventArgs e) { clickedCallback.Invoke(h, tag); }); return(h); }