Hi Walter,
yes I can override CommandHandler Methods - but I don’t know how!
Must I write a new CustomCommandHandler and inherit CommandHandler? Which of the classes (Diagram, Manager…) has the CommandHandler?
I just don’t know how?
I’ve tried:
public class CustomCommandHandler : CommandHandler
{
public override void Copy()
{
base.Copy();
}
public override void Paste()
{
base.Paste();
}
}
and then on another place:
MyDiagram.CommandHandler = new CustomCommandHandler();
Is this the right way?
Can I get the parts to paste in the Paste-Method and do some additional operation with them?
One of my issues is that my Node.Data has a Brush-Property. This Brush-Property is not serializable. If I know the Parts to copy and the Parts to paste then I can copy the Brush-Property by my own.
Also, just for information, if the Data is not serializable there is a message in the output window:
Error in model
CopyNode1: over this method to copy nodes, or have…
where is this CopyNode1 methode?