This repository was archived by the owner on May 1, 2024. It is now read-only.
Question about how button events work in CollectionView vs. outside #14943
Unanswered
DreamDelerium
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Xamarin form where I have a list and two buttons. What I am seeing is that, depending where the buttons are, the model loads differently. Depending on where the buttons reside in the Xaml page, the load events change:
Why does the placement of the buttons in the Xaml file change the order of operations in my ViewModel? And, how do I ensure that the Query Parameter setters are called first, regardless of where the buttons reside?
Here is my Xaml code:
RewardsPage.xaml
The code works fine here. But, if I move the StackLayout from the CollectionView.Footer to its own grid row, like this:
Then the code in my RewardsViewModel executes in a different order. Here is my RewardsViewModel code (simplified):
This page is called, from the previous page, that loads this page, passing in the Query Parameters:
If it helps, the RewardsVeiwModel extends BaseViewModel. That code is:
Beta Was this translation helpful? Give feedback.
All reactions