- Home
- Forum
- Xamarin.Forms
- Tap gesture and click events not working in the header view of navigation drawer
Tap gesture and click events not working in the header view of navigation drawer
Thank you for contacting Syncfusion support.
We were unable to reproduce the reported issue "Tap gesture and click events not working in the header view of SfNavigationDrawer”. We have created the sample for the reference. Please download the same from below link.
Link: http://www.syncfusion.com/downloads/support/forum/131210/ze/NavigationDrawerHamburger1606076558
Please run the sample and check whether it meets your requirement. If not please provide the detailed description of yours and it will help us to proceed further with your requirement.
Regards,
Vanaja R.A.
Hello Vanaja,
Thanks for sample. But this is for click of the hamburger icon. It is working fine in my solution. But my problem is with button, image etc click event in SfNavigationDrawer.DrawerHeaderView of SfNavigationDrawer. Following is code of DrawerHeaderView
<navigation:SfNavigationDrawer.DrawerHeaderView>
<StackLayout Orientation="Vertical" BackgroundColor="{StaticResource BlackBackground}" Margin="0,0,0,0">
<Image x:Name="imgLogo" Source="logo_side_small" Margin="20,5,0,0" HorizontalOptions="Start"/>
<Button x:Name="btnNewTeam"></Button>
</StackLayout></navigation:SfNavigationDrawer.DrawerHeaderView>
I want to fire click event of button 'btnNewTeam' and tap gesture of 'imgLogo' Image. But they are not working. Can you please provide a sample of these.
Hi! I'm having the same issue, but with a stack layout.
My code:
<xForms:SfNavigationDrawer.DrawerContentView>
<!--Conteúdo do menu-->
<StackLayout x:Name="MenuContent" BackgroundColor="{StaticResource BackgroundColor}">
<ScrollView>
<StackLayout x:Name="MenuContentView" Margin="0" Padding="5" Orientation="Vertical" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="{StaticResource BackgroundColor}">
<StackLayout Padding="10, 2, 10, 10" Orientation="Horizontal" VerticalOptions="Center">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer Tapped="Indicate_OnTapped"></TapGestureRecognizer>
</StackLayout.GestureRecognizers>
<Image Source="indicate.png" WidthRequest="18"></Image>
<Label Text="Ganhe Indicando Amigos" x:Name="LabelIndicate" FontSize="18" TextColor="{StaticResource PrimaryChangeableColor}"></Label>
</StackLayout>....
<StackLayout.GestureRecognizers> works sometimes, with some phones (some phones are ok).
We were unable to reproduce the reported issue "Tap gesture and click events are not working in DrawerContent view inside StackLayout" in SfNavigationDrawer. We have created the sample for the same. Please download it from the below link.
Link: http://www.syncfusion.com/downloads/support/forum/131210/ze/Navigationbutton1728345416
Please run the sample and check whether issue reproduces at your end. If not please modify the changes in the sample and revert the modified sample with the issue reproducing at your end and please let us know the platform in which you experience the issue and that will help us to work further with your requirement.
Regards,
Vanaja R.A.
- 5 Replies
- 3 Participants
-
RA rajveer
- Jun 28, 2017 11:29 AM UTC
- Aug 21, 2017 06:39 PM UTC