Fetching data async on page load and display it in xaml #3395
Unanswered
Feuerhamster
asked this question in
Q&A
Replies: 1 comment
-
I don't think your problem has anything to do with WASDK. However, you can change your code somewhat as follows.
3.Make sure the x:Bind mode is OneWay
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently building my first Windows app with the Windows App SDK and WinUI3. But I ran into some problems doing basic stuff.
I have a navigation sidebar which navigates to pages. On a page, I want to execute a function that loads some data. But the function has to be executed asynchronously, because otherwise it would block the UI for a few seconds. Then I want to display the Data in my xaml template.
But I couldn't find any tutorial on how to do this. No tutorial on how to fetch async data. No tutorial on how to display collections.
The code here is what I currently have. It does not work at all. First, the UI is not responding if I navigate to that page and then the app crashes without an exception displayed in Visual Studio.
PlaybackDevices.xaml.cs
PlaybackDevices.xaml
Can someone explain me how to do it right?
Beta Was this translation helpful? Give feedback.
All reactions