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. Image for the cookie policy date
close icon

Making sfBorder clickable

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



3 Replies

HM Hemalatha Marikumar Syncfusion Team 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. 



BE Benjamin 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.


MK Muneesh Kumar G Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon