Reko.Gui.Windows.TextSpanFormatter.WriteHyperlink C# (CSharp) Метод

WriteHyperlink() публичный Метод

public WriteHyperlink ( string text, object href ) : void
text string
href object
Результат void
        public override void WriteHyperlink(string text, object href)
        {
            currentSpan = null;
            var span = EnsureSpan();
            span.Style = "link";
            span.Text.Append(text);
            span.Tag = href;
            currentSpan = null;
        }

Usage Example

Пример #1
0
 public void TSF_Link()
 {
     var tsf = new TextSpanFormatter();
     tsf.Write("go to ");
     tsf.WriteHyperlink("Hell", "Aitch-ee-double-hockeysticks");
     Assert.AreEqual("go to _Hell_" + nl, Flatten(tsf));
 }