How to set background of diagram with undo/redo support