I have the following Xamarin.Forms.ContentPage
class structure
public class MyPage : ContentPage
{
public MyPage()
{
//do work t
This seems less about Xamarin.Forms
and more about using defaults in a PCL. Check out James Montemagno's github repo for doing cross-platform defaults.
Then just call his static methods for setting/retrieving. The nuget package is Xam.Plugins.Settings
.
It can be used like this:
using Refractored.Xam.Settings;
...
CrossSettings.Current.AddOrUpdateValue("AccessToken", accessToken);
var value = CrossSettings.Current.GetValueOrDefault("AccessToken");