문제

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();
    }
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top