I use a keybinding to call a Save method. But if I am currently in a textbox and changed the value, this is not commited.
The save happens before the textbox commits the changes and the saved data does not contain the changes.
How can I commit the edit mode of the current GUI element?
InputBindings.Add(new KeyBinding(((MainViewModel)this.DataContext).SavePartCommand, new KeyGesture(Key.S, ModifierKeys.Control)));
class PartViewModel
{
public override void ExecuteSaveCommand()
{
//commit the edit mode of current GUI element
//do the saving
}
}