Xamarin XAML binding to a ViewModel and a Page

When data-binding elements on a ContentPage in Xamarin Forms, suppose you want to bind some page elements to properties of the page and other elements to properties of an object in your View Model.

To accomplish this, begin by setting the BindingContext of the page itself to the parent View Model.

public PayPage(MasterVM MasterVM)  
     mvm = MasterVM;
     BindingContext = mvm;


In the XAML, here is an example of an element with a binding to the View Model:

<Label Text="{Binding Path=SettingsVM.PayRate}"/>  

And here is an example of an element bound to a property of the page:

<Label Text="{Binding Path=RegularPay, Source={x:Reference payPage}}" />  

A helpful resource on Xamarin XAML Markup Extensions can be found here: