public CharacterDetailPage() { InitializeComponent(); // create and initialize new data var data = new Character { Id = Guid.NewGuid().ToString(), name = "Dan", description = "Dan is the man", characterClass = "paladin", }; data.attributes.defense = 1; data.attributes.alive = true; data.attributes.attack = 1; data.attributes.attackModifier = 1; data.attributes.currentExperience = 0; data.attributes.currentHealth = 10; data.attributes.currentExperience = 0; data.attributes.defenseModifier = 1; data.attributes.health = 10; data.attributes.level = 1; data.attributes.speed = 1; data.attributes.speedModifier = 1; _viewModel = new CharacterDetailViewModel(data); BindingContext = _viewModel; }
public DeleteCharacterPage(CharacterDetailViewModel viewModel) { // Save off the item Data = viewModel.Data; viewModel.Title = "Delete " + viewModel.Title; InitializeComponent(); // Set the data binding for the page BindingContext = _viewModel = viewModel; }
public CharacterDetailPage(CharacterDetailViewModel viewModel) { InitializeComponent(); BindingContext = _viewModel = viewModel; }