Binding Context causes app to crash

mrizoiwe98 66 Reputation points
2021-03-28T21:37:26.267+00:00

I am trying to follow this tutorial to bind a Switch to a Preference. The problem is when I launch the activity the app crashes. I included the Binding Context in the xaml file . But if I remove that context, and just add BindingConext = this to the cs file , then it works. I don't understand why it doesn't work if I do it the other way?

Developer technologies .NET Xamarin
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.