protected override void Write([NotNull] WpfRenderer renderer, [NotNull] CodeBlock obj) { var paragraph = new Paragraph(); paragraph.SetResourceReference(FrameworkContentElement.StyleProperty, Styles.CodeBlockStyleKey); renderer.Push(paragraph); renderer.WriteLeafRawLines(obj); renderer.Pop(); }
protected override void Write(WpfRenderer renderer, CodeBlock obj) { if (renderer == null) { throw new ArgumentNullException(nameof(renderer)); } var paragraph = new Paragraph(); paragraph.SetResourceReference(FrameworkContentElement.StyleProperty, Styles.CodeBlockStyleKey); renderer.Push(paragraph); renderer.WriteLeafRawLines(obj); renderer.Pop(); }