We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tap gesture and click events not working in the header view of navigation drawer

Thread ID:

Created:

Updated:

Platform:

Replies:

131210 Jun 28,2017 11:29 AM UTC Aug 21,2017 06:39 PM UTC Xamarin.Forms 5
loading
Tags: SfNavigationDrawer
rajveer
Asked On June 28, 2017 11:29 AM UTC

hello , 

I was working on a xamarin forms project, i have using SfNavigationDrawer for side menu. I have put an image and a button in DrawerHeaderView of drawer, but  sadly neither the click event of button nor tap gesture is working for the image. I am struck on this for the last 2 days. Is there any solution so that these events can be fired from elements in Header View of navigation drawer.



Vanaja  Annasamy [Syncfusion]
Replied On June 29, 2017 11:20 AM UTC

Hi Rajveer, 
 
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.  


rajveer
Replied On June 29, 2017 12:09 PM UTC

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.



Vanaja  Annasamy [Syncfusion]
Replied On June 30, 2017 12:16 PM UTC

Hi Rajveer, 
  
Sorry for the inconvenience. 
  
We were able to reproduce the reported issue "Tap gesture and click events are not working in Header view" in SfNavigationDrawer. The fix for the reported issue will be included in 2017 Volume 2 SP2 release which is expected to be rolled out by the beginning of July 2017. 
  
Regards, 
Vanaja R.A. 


CARLOS MEDEIROS DORIA NETO
Replied On August 18, 2017 07:17 PM UTC

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). 


Vanaja  Annasamy [Syncfusion]
Replied On August 21, 2017 06:39 PM UTC

Hi Carlos,

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.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;