Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Application.Current.Properties properties not persisting between application runs

IanGeogheganIanGeoghegan USUniversity ✭✭
edited September 2015 in Xamarin.Forms

This behavior persists with the latest ( release of Forms and I have filed a bug on it with reproduction steps here:

Can anyone confirm that they are experiencing the same behavior? Thanks.


  • DavidStrickland0DavidStrickland0 USMember ✭✭✭

    Note: Just noticed that your working on a Mac and make a reference to IOS down in your reproduction steps so knowing it works on Android might not be much help :D.

    Tried this in Xamarin Studio 5.9.6(windows) testing with a Samsung GT-S5301 the functionality for me appears to work as I would expect. I did however have to make a change to the code posted in the bug report to get it to work.

    if( !Properties.ContainsKey( "testKey" ) )
    Debug.WriteLine( "TestKey not found in properties; creating accordingly. || App.OnStart()" );
    Properties.Add( TestKey, "Test key!!!" );
    if( !Properties.ContainsKey( "testKey" ) )
    Properties.Add( "testKey", "Test key!!!" );

    I put a break point on Properties.Add it dropped into the if on the first run. I stopped the app and reran it from the IDE and it bypassed the code the second time.

    Your issue caught my eye because implementing Properties in an app is on my todo list today. If I have any issues I'll update here but as it sits it looks like it should full-fill my needs.

Sign In or Register to comment.