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?