I'm trying to use a read-only syntax editor inside a GridView. The goal is to display XML data in the grid view with syntax highlighting.
As the SyntaxEditor needs code to populate it, I defined a descendant class with Language and Text dependency properties
My first try was to use the following code for the cell:
The problems are the following:
- The display has line numbers and unnecessary scroll bars.
- When I try to zoom in with the mouse wheel, the height doesn't change.
- When I try to zoom out with the mouse wheel, the control seems to have an infinite height and the application freezes, using 100% of a CPU core.
To avoid problem 3, I've tried to set a maximum height for the control, using MaxHeight="150". Now, each grid view row has a height of 150, even if the content is smaller.