public SettingsPage() { using (var scope = App.Container.BeginLifetimeScope()) { this.BindingContext = vm = scope.Resolve <ISettingsViewModel>(); } InitializeComponent(); apiUrl.Unfocused += (object sender, FocusEventArgs e) => { vm.OnApiUrlChange(); }; }