コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }