// Note - The Xamarin.Forms Previewer requires a default, parameterless constructor to render a page. public TestSectionQuestionsPage() { InitializeComponent(); var item = new Section { Title = "Section Title", SectionNumber = 1, Description = "Section Description", Questions = new List <Question>() }; viewModel = new TestSectionQuestionsViewModel(item); BindingContext = viewModel; }
public TestSectionQuestionsPage(TestSectionQuestionsViewModel viewModel) { InitializeComponent(); BindingContext = this.viewModel = viewModel; }