public ContactDetailPage(Contact contact = null) { InitializeComponent(); if (contact == null) { ViewModel = new ContactDetailPageViewModel(Navigation); } else { ViewModel = new ContactDetailPageViewModel(Navigation, contact); } this.BindingContext = ViewModel; }