Exemplo n.º 1
0
        private static string RenderXamlForDeclaration(string name, IAst ast)
        {
            var declatation = ast as Declaration;
            var suffix      = declatation == null ? null : (": " + Utils.Escape(declatation.Name.Text));

            return(@"
<Span xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
" + (string.IsNullOrWhiteSpace(name) ? null : ("<Span Foreground = 'blue'>" + Utils.Escape(name) + "</Span>: "))
                   + ast.ToXaml() + suffix + @"
</Span>");
        }
    private static string RenderXamlForDeclaration(string name, IAst ast)
    {
      var declatation = ast as Declaration;
      var suffix = declatation == null ? null : (": " + Utils.Escape(declatation.Name.Text));
      return @"
<Span xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
" + (string.IsNullOrWhiteSpace(name) ? null : ("<Span Foreground = 'blue'>" + Utils.Escape(name) + "</Span>: "))
             + ast.ToXaml() + suffix + @"
</Span>";
    }