Example #1
0
        public ContentPage Build(ViewType modelType, BaseViewModel viewModel)
        {
            switch (modelType)
            {
            case ViewType.Main:
                var mainPage = new MainPage(viewModel);
                return(mainPage);

            case ViewType.New:
                var newEntryPage = new NewEntryPage(viewModel);
                return(newEntryPage);

            case ViewType.Detail:
                var detailPage = new DetailPage(viewModel);
                return(detailPage);

            default:
                throw new InvalidEnumArgumentException($"Unknown {modelType}");
            }
        }
Example #2
0
        public ContentPage BuildDetailPage(DetailPageViewModel vm)
        {
            var page = new DetailPage(vm);

            return(page);
        }