Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }