Frage

I have a constructor with data to be loaded when the Application run for the first time. However when I press back to exit my application, I can no longer load the constructor once I launch the application again. However this problem will not exist when I press the window button and proceed to select my application. The constructor data will still be loaded for this scenario:

public MainPage()
    {
        InitializeComponent();

        loadData();
    }
War es hilfreich?

Lösung

It is because some information is saved in the memory. So if you want to call it everytime you login subscribe to the loaded event.

So in your construvtor write this.loaded += and what you want this will allways be called.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top