Beispiel #1
0
        public void RenderTo(IExampleWriter writer)
        {
            var codeSnippetWriter = writer.AddCodeSnippet("xaml");
            var xamlNamespace     = typeof(T).Assembly.GetName().Name;

            codeSnippetWriter.Write("<{0}:{1} ", xamlNamespace, _controlName);

            foreach (var pair in _values)
            {
                var property = pair.Key;
                var value    = pair.Value;
                codeSnippetWriter.Write("{0}=\"{1}\" ", property.Name, value);
            }

            codeSnippetWriter.WriteLine("/>");

            _dispatcher.Invoke(() =>
            {
                var screenshot        = CaptureScreenshot(_element);
                var relativeImagePath = _controlDocumentationCreator.AddImage(screenshot, _exampleName);
                writer.AddImage(string.Format("Image of {0}, {1}", _controlName, _exampleName), relativeImagePath);
            }, DispatcherPriority.Background);
        }
Beispiel #2
0
 public void RenderTo(IExampleWriter writer)
 {
     writer.AddCodeSnippet("C#").WriteLine(_writer);
 }