Closed Coke21 closed 5 years ago
Hey, I missed your question. Yeah, you just needed to tell Jot when to persist the data to the store. You can skip the second argument if the target object (that's being tracked) is the source of the event:
.PersistOn(nameof(PropertyChanged));
Hi, I'm trying to use caliburn.micro and MVVM to save some controls in my app. This is the Constructor of my MainView (MainViewModel):
That's how RunHiddenCheckBox property looks like:
MyMainWindow is just a string property. No exceptions are being thrown, however, the library doesn't create any folders and .json files. Any idea why? I guess I have to put .PersistOn somewhere but not sure where and what to put in. I tried:
.PersistOn(nameof(PropertyChanged), RunHiddenCheckBox);
But I'm getting NullReferenceException.Update: Ok, I found the solution:
.PersistOn(nameof(PropertyChanged), this);
^ I had to put the above to save all controls. I hope this will help somebody.