//this method takes in a monster class that allows editing of its name and description only public NewMonsterPage(Monster edit) { InitializeComponent(); monAccess = new MonstersDBDataAccess(); Title = "Change Monster details"; Monsters = edit; BindingContext = this; //bind to display the current details }
MonstersDBDataAccess monAccess; //start a database access public NewMonsterPage() { InitializeComponent(); monAccess = new MonstersDBDataAccess(); //intialize the database Title = "New Entry"; //bind from xaml page Monsters = new Monster //intialize a new monster { Name = "Name of Monster", Description = "I am a gruesome detail of a monster." }; BindingContext = this; //bind it to our xaml page }
public MonstersPage() { InitializeComponent(); //initializing this.DNDDatabase = new MonstersDBDataAccess(); }
public MonsterDetailPage(MonsterDetailViewModel monModel) { InitializeComponent(); DNDDatabase = new MonstersDBDataAccess(); BindingContext = this.MonsterModel = monModel; }