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

Changing the color of selected accordion item and the accordion button

How do we change the color of the selected item in sfaccordion as well as the color of the arrow(which is used to expand the accordion). Also, is there any way to change the placement of the arrow - for example, to the left of the header of accordion item? Thanks is advance.

5 Replies

SM Sugapriya Mariappan Syncfusion Team June 17, 2016 06:49 AM UTC

Hi Aayush,

Thank you for contacting Syncfusion Support.

We have prepared a sample based on your requirement. In this sample we have changed the color of the Accordion header and Arrow through AccordionButtonStyle. We have also changed the placement of the arrow to the left of the header of the AccordionItem by editing the same style

Sample:SfAccordionUWPSample

Regards,
M.Sugapriya


AG Aayush Gupta June 17, 2016 08:01 AM UTC

Hi, thanks for the reply. I saw the same sample in a previous thread. This handles the controls for all the properties in the sfaccordion element. I have already made a project with all the data and just need to change the color for the selected item and the arrow. There must be some single control for that, instead of binding my entire layout to the code provided in the sample. Thanks in advance


VR Venkateshwaran Ramdoss Syncfusion Team June 20, 2016 10:51 AM UTC

 Hi Aayush,

We have prepared a sample based on your requirement. In this, we have changed the Foreground and Background of the SelectedItem and arrow of the SfAccordion by setting ExpandedBackground and ExpandedStroke SolidColorBrush when the VisualState is Expanded. Please download the sample from the below link.

sample:  SfAccordionUWPSample

Hope it will help you solve the issue.

Regards,
Venkateshwaran V.R.  



AG Aayush Gupta June 21, 2016 01:16 PM UTC

Thanks a lot, it solved the problem!


VR Venkateshwaran Ramdoss Syncfusion Team June 22, 2016 03:57 AM UTC

Hi Aayush,

We are glad that your issue has been resolved.
Please let us know if you need any other assistance.

Regards,
Venkateshwaran V.R.

Loader.
Live Chat Icon For mobile
Up arrow icon