I have a dockpane viewmodel with some controls in it that gets its data populated by selecting an element on the map. inside of the dockpane are some controls with operations that affect data. These operations are added to the undo stack and function properly, however, the viewmodel is not updated with undo/redo until the element is reselected from the map.
Is there an event to subscribe to or some sort of callback to set?
Solved! Go to Solution.
Hi,
Try to catch EditCompletedEvent event in your viewmodel. EditCompletedEventArgs has property CompletedType.
It describes the type of an EditCompletedEvent and could be one enum EditCompletedType values.
private Task OnEditCompleted(EditCompletedEventArgs args)
{
switch (args.CompletedType)
{
case EditCompletedType.Save:
break;
case EditCompletedType.Discard:
break;
case EditCompletedType.Operation:
break;
case EditCompletedType.Undo:
case EditCompletedType.Redo:
// do your stuf
break;
case EditCompletedType.Reconcile:
break;
case EditCompletedType.Post:
break;
default:
throw new ArgumentOutOfRangeException();
}
}
Hi,
Try to catch EditCompletedEvent event in your viewmodel. EditCompletedEventArgs has property CompletedType.
It describes the type of an EditCompletedEvent and could be one enum EditCompletedType values.
private Task OnEditCompleted(EditCompletedEventArgs args)
{
switch (args.CompletedType)
{
case EditCompletedType.Save:
break;
case EditCompletedType.Discard:
break;
case EditCompletedType.Operation:
break;
case EditCompletedType.Undo:
case EditCompletedType.Redo:
// do your stuf
break;
case EditCompletedType.Reconcile:
break;
case EditCompletedType.Post:
break;
default:
throw new ArgumentOutOfRangeException();
}
}