If you follow my posts, you noticed that I started up WinRT database project on CodePlex. I just published as small update to it that now support data binding of commands objects to IsDirty flag on database and each table. The code is quite simple, for example here is how Save command is setup.
public SimpleCommand<object> SaveCommand { get; set; }
public void OnSave(object parameter)
{
if (_database != null)
{
_database.SaveAsync();
}
}
public bool CanSave(object parameter)
{
return (_database != null && !_database.IsBusy && _database.IsDirty);
}
Now you can have cleaner UI, where Save button provides visual feedback to the users. Comments are welcomed as always.
Thanks.