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?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
{count} votes