Pulkesh
Pulkesh

Reputation: 1

I have an issue where I want to share value from a PCL project to platform specific project

Hi I have just started with Xamarin.forms and I am stuck with a problem where I have some pages in PCL project like login and dashboard, and I want to get set the shared preference values from code behind files of this pages like "Userinfo" in login button of Login page. Please help me out,

Thanks in advance

Upvotes: 0

Views: 53

Answers (1)

Shalva Avanashvili
Shalva Avanashvili

Reputation: 899

You need the settings plugin by James Montemagno. Look here how to use it.

You can use:

  • Android: SharedPreferences
  • iOS: NSUserDefaults
  • Windows Phone: IsolatedStorageSettings
  • Windows RT / UWP: ApplicationDataContainer

Upvotes: 1

Related Questions