Background of print preview

SyntaxEditor for WPF Forum

Posted 12 years ago by Kasper
Version: 12.1.0562
Avatar

Hi guys,

I use your EditorDocumentViewer for print previews and the CreateFixedDocument() method on the SyntaxEditor instance to assign content to the preview. My problem is that while syntax colors are taken directly from the SyntaxEditor instance, as I would expect, the background color is not. This causes problems when I have a dark theme loaded in the editor, where the background is a dark grey and some of the colors are very light or even white, which will be invisble on a white background. Is there a property I should set on the EditorDocumentViewer or is it something that you have to handle in the CreateFixedDocument method? I tried setting the Background property on the EditorDocumentViewer, but that was for the background around the document :)

Comments (2)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Kasper,

Unfortunately I don't believe we have any control over the background of that control since it's built up by Microsoft. 

That being said, you might be able to fire up another SyntaxEditor instance, set its HighlightingStyleRegistry property to a registry with better colors that are designed for a white background and print off that.


Actipro Software Support

Posted 12 years ago by Kasper
Avatar

Great idea! Thank you :)

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.