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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Making sfBorder clickable

Thread ID:

Created:

Updated:

Platform:

Replies:

148341 Oct 16,2019 05:04 AM UTC Oct 29,2019 05:08 AM UTC Xamarin.Forms 3
loading
Tags: SfButton
Benjamin
Asked On October 16, 2019 05:04 AM UTC

My current app look like this


i would like to make each of the 4 boxes into buttons such that when user click on each of them they will be bought to the respective xaml page

is it possible with sfBorder and sfButtons?

i am able to render the content, but wrapping the sfBorder inside sfButton and when i click on it nothing happens. 

wrapping sfButtons inside sfBorder like this
<sfBorder> , <sfButtons>, <Stacklayout>, <content> 
cause the content to not shown, only a small thing is shown like this



Hemalatha Marikumar [Syncfusion]
Replied On October 18, 2019 04:42 PM UTC

Hi Benjamin, 
 
Greetings from Syncfusion. 
  
We have analysed your requirement. You can use any of the following solutions to achieve your requirement. 
 
·       SfBorder inside the SfButton and add TapGesture for SfBorder for page navigation 
·       Directly use the SfButton for your customization. 
  
Solution 1: You can enable the touch interactions for SfBorder by using the GestureRecognizers. Please refer the below code. 
  
Code snippet [XAML]: 
<border:SfBorder > 
    <border:SfBorder.GestureRecognizers> 
        <TapGestureRecognizer Command="{Binding OnBorderTap}" /> 
    </border:SfBorder.GestureRecognizers> 
    .  .  . 
</border:SfBorder> 
  
Solution 2: We like to let you know that we have implemented SfButton control by inheriting the SfBorder control. So SfButton has all the properties like SfBorder. So, you can directly use SfButton to achieve your requirement. Please download the sample from the below link. 
  
  
Screenshot: 
 
  
Please get back to us for further assistance. 

Regards,
Hemalatha M. 


Benjamin
Replied On October 29, 2019 03:06 AM UTC

Hi Hemalatha,

Firstly sorry for the late reply.

I have tried your suggestion and able to achieved what I wanted using option 2.

Thanks a lot for the assistance.

Muneesh Kumar G [Syncfusion]
Replied On October 29, 2019 05:08 AM UTC

Hi Benjamin,  
 
Thanks for the update. 
  
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
 
Thanks, 
Muneesh Kumar G 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon