Esempio n. 1
0
        protected override void Write(XamlRenderer renderer, AutolinkInline obj)
        {
            if (renderer == null)
            {
                throw new ArgumentNullException(nameof(renderer));
            }
            if (obj == null)
            {
                throw new ArgumentNullException(nameof(obj));
            }

            var url = obj.Url;

            if (obj.IsEmail)
            {
                url = "mailto:" + url;
            }

            renderer.Write("<Hyperlink");
            renderer.Write(" Style=\"{StaticResource {x:Static markdig:Styles.HyperlinkStyleKey}}\"");
            renderer.Write(" Command=\"{x:Static markdig:Commands.Hyperlink}\"");
            renderer.Write(" CommandParameter=\"").WriteEscapeUrl(url).Write("\"");
            renderer.Write(">");
            renderer.WriteEscapeUrl(obj.Url);
            renderer.WriteLine("</Hyperlink>");
        }
Esempio n. 2
0
 protected override void Write([NotNull] XamlRenderer renderer, [NotNull] AutolinkInline obj)
 {
     renderer.Write("<Hyperlink");
     renderer.Write(" Command=\"{x:Static markdig:Commands.Hyperlink}\"");
     renderer.Write(" CommandParameter=\"").WriteEscapeUrl(obj.Url).Write("\"");
     renderer.Write(">");
     renderer.WriteEscapeUrl(obj.Url);
     renderer.WriteLine("</Hyperlink>");
 }
Esempio n. 3
0
        protected override void Write([NotNull] XamlRenderer renderer, [NotNull] AutolinkInline obj)
        {
            var url = obj.Url;

            if (obj.IsEmail)
            {
                url = "mailto:" + url;
            }

            renderer.Write("<Hyperlink");
            renderer.Write(" Style=\"{StaticResource {x:Static markdig:Styles.HyperlinkStyleKey}}\"");
            renderer.Write(" Command=\"{x:Static markdig:Commands.Hyperlink}\"");
            renderer.Write(" CommandParameter=\"").WriteEscapeUrl(url).Write("\"");
            renderer.Write(">");
            renderer.WriteEscapeUrl(obj.Url);
            renderer.WriteLine("</Hyperlink>");
        }