private void SelectOption(ButtonItemView button) { if (button.Text.Equals(Answer)) { return; } else { SelectOption(button.Text); } }
private void UpdateOptions() { if (Options != null) { foreach (string option in Options) { ButtonItemView btnItemView = new ButtonItemView(); btnItemView.Text = option; btnItemView.Command = new Command(() => { SelectOption(btnItemView); }); OptionStackLayout.Children.Add(btnItemView); } } }