public AddOrEditBlendPage(BlendViewModel viewModel) { InitializeComponent(); var blendingJournal = new SQLiteBlendingJournal(DependencyService.Get <ISQLiteDb>()); var pageService = new PageService(); Title = (viewModel.Nume == null) ? "Blend nou" : "Modifică blend"; BindingContext = new AddOrEditBlendViewModel(viewModel ?? new BlendViewModel(), blendingJournal, pageService); }
public BlendDetailPopUp(BlendViewModel viewModel) { InitializeComponent(); var blendingJournal = new SQLiteBlendingJournal(DependencyService.Get <ISQLiteDb>()); var pageService = new PageService(); ViewModel = new BlendDetailViewModel(viewModel, blendingJournal, pageService); BindingContext = new BlendDetailViewModel(viewModel ?? new BlendViewModel(), blendingJournal, pageService); }