Hi,
I want to remove the UndoManager becuase i don't need the ability of undo and I want to save memeory.
but when I set:
model.HasUndoManager = false;
the control don't behave good.
This problem reproduces in the goWPF demo in the FlowGrammer when I change the HasUndoManager from true to false.
When I add a new node it looks like
Only after resizing the window it looks ok<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Can you tell me how can I remove the undo manager and keep the control working properly?<o:p></o:p>
Thanks<o:p> </o:p>
<font =“Apple-style-span” face=“Consolas” size=“3”><p =“Msonormal” style="font-family: Consolas; font-size: 13px; "><o:p> </o:p>
That’s interesting. I wonder why no one has reported that before.
You can avoid this problem by using your own UndoManager that doesn’t record any Changed events:
public class CustomUndoManager : UndoManager {
protected override bool SkipEvent(ModelChangedEventArgs evt) { return true; }
}
and then replace:
model.HasUndoManager = true;
with:
model.UndoManager = new CustomUndoManager();