protected override void OnAppearing() { base.OnAppearing(); vmDetail = (WordsLangDetailViewModel)BindingContext; BindingContext = vmDetail.ItemEdit; vmDetail.ItemEdit.Save.WhenFinishedExecuting().Subscribe(_ => Navigation.PopModalAsync()); }
public WordsLangDetailDlg(Window owner, WordsLangViewModel vm, MLangWord item) { InitializeComponent(); SourceInitialized += (x, y) => this.HideMinimizeAndMaximizeButtons(); tbWord.Focus(); Owner = owner; vmDetail = new WordsLangDetailViewModel(vm, item); DataContext = vmDetail.ItemEdit; dgWords.DataContext = vmDetail.vmSingleWord; }