Only the Binding knows the View's Dirty (and Valid) state
given that both the ViewModel and View needs this information
it would make sense for the Binding (or BindingGroup) to communicate this to the ViewModel
(in much the same way it communicates TextBox.Text to the ViewModel)
For most use cases the following would suffice:
and then:
given that both the ViewModel and View needs this information
it would make sense for the Binding (or BindingGroup) to communicate this to the ViewModel
(in much the same way it communicates TextBox.Text to the ViewModel)
For most use cases the following would suffice:
public bool IsDirty { get; set; }
public bool IsValid { get; set; }
This could be convention-bound by CMand then:
public bool CanSave { get { return IsDirty && IsValid; } }
public bool CanCancel { get { return IsDirty; } }
Without this mechanism the UI is not communicating with the User correctly and the experience won't be high-quality