We are trying to change the colour of the grid lines/background dynamically to allow live theme switching in our app. We are able to do this to nodes quite easily through bindings. However, the bindings don’t seem to work on the grid properties (unassuming because the data to bind to is in the node model data and is not available to the grid template).
Is there a way to use bindings in the grid template or do I have to update it by recreating/redrawing the grid in the diagram?
That is correct – the Diagram.grid is in an unmodeled Part and thus does not support data binding. But you could just set the Shape.stroke of the shape(s) in the Diagram.grid.
within the grid template but I can’t see the stroke property when accessing the diagram.grid object (I’m using TypeScript and don’t get the type hinting). I also cant see a method to get a list of shapes in the grid to be able to set their stroke values either