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

Can I add a small button onto the header?

My accordion stretches full screen, but my client wants me to put a small button to allow him to "lock" some sections.  I tried just adding a button to my header template, but even if I click right on top of the button the accordion section collapses and neither the Click or Tapped callbacks are called.   Is this possible?

3 Replies

VR Vijayalakshmi Roopkumar Syncfusion Team July 22, 2016 03:09 PM UTC

Hi Deanna, 
Thank you for using Syncfusion Products. 
In our SfAccordion, the Accordion Item will collapses when click anywhere on Accordion and not on control in the Header of Accordion. This is the default behaviour of our SfAccordion Control.  So on clicking the right on top of the button, the accordion will get collapsed. We have prepared a sample using the provided information by setting Button on its Header Template. Please download the sample from the following location:

Sample:UWP_SfAccordion

Please check our sample and let us know whether our understanding on the reported issue is different? If so, please brief about your issue by providing screenshot, so that it would be helpful for us to proceed further on this.

Regards,
Vijayalakshmi V.R. 



DD Deanna Delapasse July 22, 2016 07:25 PM UTC

Hi Vijayalakshmi!

What I was hoping to do was to add a "Lock" button so that the user can disable the section in the accordion, but I just realized the IsLocked property on the SfAccordionItem is ReadOnly  When locked the AccordionButton should NOT ever expand, but I need my new header "Lock" button to remain active so the user can click my button again to "Unlock".

Please see the example and my "LockButton_Click" method in MyHeader.xaml.  Is there any way to disable the  "expandable" property while leaving a header button enabled?  Can I override some style possibly so at least it doesn't appear to be open?  Maybe set height of the expanded section to 0?

Attachment: SfAccordionUWPSample_327dd7b9.zip


VR Venkateshwaran Ramdoss Syncfusion Team July 26, 2016 02:09 PM UTC

Hi Deanna,

Thanks for your update.

At present there is no support for the reported requirement. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Regards,
Venkateshwaran V.R.

Loader.
Live Chat Icon For mobile
Up arrow icon