Reputation: 63
I want to know why we can't put in a class C # with Xamarin.forms "BindingContext = this" but we can do it in a content page (class and .Xaml) ?
Upvotes: 1
Views: 65
Reputation: 12723
It is a good question. Hard to explain that.First,you should understand what Context is.
Context: can be understanded worked with a content page.If have a content page ,there will has a context about it.Rather than why not c# class can not use(bindContext).The Context is connected with the entire life circle of the content page.
Then BindingContext was born to use about content page.
Don't struggle too much,maybe you can refer to the Context explanation of Android Context of Android ,you'll actually find that Context is amazing .But they are the same thing,just for reference only.
Upvotes: 1