Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

Local store not persistant when restarting App in Xamarin Forms WPF #3541

@microteq

Description

@microteq

Description

Trying to store local data permanently in Xamarin Forms WPF, but as soon as we stop the program and then restart, all the settings are gone. This works correctly in UWP and Android

Steps to Reproduce

  1. Create a new WPF project.

  2. Add the following code to the MainWindow class:

        object Test = null;
        bool found = Application.Current.Properties.TryGetValue("Test",out Test);
        Application.Current.Properties["Test"]= "TestValue";
        Application.Current.SavePropertiesAsync();
        found = Application.Current.Properties.TryGetValue("Test", out Test);
    
  3. Start the program (the value should be stored permanently)

  4. End the program, restart and check the value Application.Current.Properties.Count in debug mode. It is 0, but should be 1.

Expected Behavior

The value "TestValue" should be stored permanently in WPF.

Actual Behavior

On every restart of the program, the valus is gone.

Basic Information

  • Version with issue: VS2017 Ver. 15.7.6
  • Last known good version:
  • IDE:
  • Platform Target Frameworks: WPF
  • Affected Devices: We have got the issue on two different Win 10 devices.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions