0

So I want to use LocalSettings (for UWP) inside my ViewModel class (so that I can persist data between views) but I keep getting this error in this screenshot: enter image description here

However, I try to add a reference to the assembly but nothing happens.

My ViewModel inherits from ViewModelBase (Common logic among all view models)

MyViewModel : ViewModelBase 

Where ViewModelBase : INotifyPropertyChanged, ILoadableViewModel, IVisibilityAwareViewModel

What can I do to persist data between viewmodels in this scenario? I have a property in one of my viewmodels that I want to use in another viewmodel and that's where the issue lies.

Euridice01
  • 2,510
  • 11
  • 44
  • 76

1 Answers1

0

You can't use LocalSettings in PortableClassLibrary (PLC) .

When i need save data i use this plugin https://github.com/jamesmontemagno/SettingsPlugin . It's a great plugin . You should try it.