InitializeComponent() or set BindingContext? What should be called first? #28894
Unanswered
Marioo1357
asked this question in
Q&A
Replies: 2 comments 7 replies
-
To my understanding, the only place where this matters is when it comes to observing binding context changes. I think that if you set it before |
Beta Was this translation helpful? Give feedback.
2 replies
-
Are you referring to the ContentPage? If so, I recommend setting BindingContext in XAML so that x:DataType can be set simultaneously. |
Beta Was this translation helpful? Give feedback.
5 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.
-
Hi, I wonder what in xaml.cs constructor should be called first?
InitializeComponent is called first in MAUI samples.
Also, I saw few tickets/issues where setting BindingContext right after InitializeComponent() was the solution:
I have a question, is it really matter?
Beta Was this translation helpful? Give feedback.
All reactions