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}"); } }
public ContentPage BuildDetailPage(DetailPageViewModel vm) { var page = new DetailPage(vm); return(page); }