Created
March 12, 2023 15:39
-
-
Save bbenetskyy/6ec7e95d33df1fda8f0741bea8cfc497 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void TapGestureRecognizer_Tapped(System.Object sender, Microsoft.Maui.Controls.TappedEventArgs e) | |
{ | |
if (e.Parameter is SelectableModel selectable) | |
{ | |
selectable.IsSelected = !selectable.IsSelected; | |
} | |
else if (e.Parameter is QuestionableModel questionable) | |
{ | |
var frame = sender as Frame; | |
var label = frame.Children.First() as Label; | |
questionable.Answer = label.Text.Equals("yes", StringComparison.InvariantCultureIgnoreCase) | |
? Answer.Yes | |
: Answer.No; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment