public MonsterDeletePage(MonsterDetailViewModel viewModel) { // Save the item Data = viewModel.Data; viewModel.Title = "Delete " + viewModel.Data.Name; InitializeComponent(); // Set the data binding for the page BindingContext = _viewModel = viewModel; }
public MonsterEditPage(MonsterDetailViewModel viewModel) { // Save off the item Data = viewModel.Data; // Items = Services.MockDataStore.Instance.GetItemList(); viewModel.Title = "Edit " + viewModel.Title; InitializeComponent(); // Set the data binding for the page BindingContext = _viewModel = viewModel; }
// Constructor public MonsterDetailPage() { InitializeComponent(); var data = new WDown.Models.Monster { // Default values Name = "Monster Unknown", Description = "This is a monster description.", Level = 1 }; _viewModel = new MonsterDetailViewModel(data); BindingContext = _viewModel; }