Navigating Pages #1258
-
I have noticed since updating to 0.8 that when I have the following scenario the code Executes before it loads/displays the page.
On 0.5 it would Navigate to the next page as normal then start to execute the code, but on 0.8 it freezes on the main window and doesn't load the next page until all the code has executed. I have a ProgressRing and TextBlock on my apply settings page so that the user knows whats happening. What's the proper way of having code launch once the next page is visible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Operations in your Loaded callback are performed on the UI thread by default, which means any non-async operations will block the UI, which is likely why you're seeing the page freeze up till it finishes the operations. What kind of operations are you doing where you said We'll need to see the rest of your code to help you more though. |
Beta Was this translation helpful? Give feedback.
Operations in your Loaded callback are performed on the UI thread by default, which means any non-async operations will block the UI, which is likely why you're seeing the page freeze up till it finishes the operations.
What kind of operations are you doing where you said
\\Does UI stuff while apply settings
? If those operations involve loading data or other non-UI operations, you can likely try to offload those to a separate thread.We'll need to see the rest of your code to help you more though.