<ContentView HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
Grid.Row="0"
Grid.Column="0">
<ContentView.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizerShowChannels_Tapped" />
</ContentView.GestureRecognizers>
</ContentView>
Grid's GestureRecognizers not working
Hi,
I am trying to use GestureRecognizers with my Grid as you can see in below code but the TapGestureRecognizerShowChannels_Tapped is not getting fired.
<Grid Grid.Row="0" Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<SyncfusionAvatar:SfAvatarView x:Name="ChannelAvatarLogo" Grid.Column="0" Grid.RowSpan="2" Margin="0,0,10,10"
ContentType="Initials"
AvatarName="{Binding channel_name}"
BackgroundColor="Black"
BorderColor="Black"
InitialsColor="White"
InitialsType="DoubleCharacter"
AvatarShape="Custom"
ImageSource="{Binding channel_logo}"
HorizontalOptions="Center"
VerticalOptions="Start"
WidthRequest="50"
HeightRequest="50"
CornerRadius="5" />
<Label x:Name="LabelChannelName" Grid.Column="1" Grid.Row="0" Style="{StaticResource BaseLabel}" FontAttributes="Bold" />
<Label x:Name="LabelChannelCountry" Grid.Column="1" Grid.Row="1" Style="{StaticResource BaseLabel}" />
<BoxView Grid.Row="2" Grid.ColumnSpan="2" HeightRequest="1" Color="LightGray" Margin="0, 10, 0, 10" />
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizerShowChannels_Tapped" NumberOfTapsRequired="1" />
</Grid.GestureRecognizers>
</Grid>
Kindly help..
Thanks,
Jassim
2 answers
Sort by: Most helpful
-
stone z 76 Reputation points
2021-09-13T02:57:46.043+00:00 -
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 79,546 Reputation points Microsoft Vendor
2021-09-17T03:17:46.29+00:00 Hello,
Welcome to our Microsoft Q&A platform!
I move the
TapGestureRecognizer
to top place like following screenshot. it worked as normal. That is weird.Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.