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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Collapse all items and error in docs

Thread ID:





145695 Jul 4,2019 08:08 AM UTC Jul 5,2019 01:40 PM UTC WPF 1
Tags: SfAccordion
Asked On July 4, 2019 08:08 AM UTC

Is there any way to set the inital state of all the items to collapsed?

Also some of the examples on the web page https://help.syncfusion.com/wpf/sfaccordion/appearence-and-styling#applying-accent-colors  use Style examples like this;

<!--  AccordionButton Style -->
<Style TargetType="syncfusion:AccordionButton" x:Key="expanderButtonStyle">
    <!--  Customization codes -->
	    <VisualStateGroup x:Name="ExpansionStates">
		    <VisualState x:Name="Collapsed">

This won't compile, it gives an error "the attached property can only be applied to types that are derived from frameworkelement"
it needs to be set as below;

     <Style TargetType="syncfusion:AccordionButton" x:Key="expanderButtonStyle">
            <!--  Customization codes -->
            <Setter Property="Template">
                    <ControlTemplate TargetType="syncfusion:AccordionButton">
                        <Border x:Name="background" Background="{Binding Background}"  CornerRadius="1,1,1,1">

Subburaj Pandian Veluchamy [Syncfusion]
Replied On July 5, 2019 01:40 PM UTC

Hi Tom, 
Thank you for contacting Syncfusion support. 
We have analyzed your reported query “Anyway to set the initial state of all the items to collapsed” in WPF SfAccordion. Currently, we did not have this support for SfAccordion. Please confirm and let us know about your requirement in detail, it will be helpful for us to consider the same while implementing. 
Regarding Documentation:  
We checked this code snippet and we can able to reproduce your reported error “The attached property can only be applied to types that are derived from Framework element". We have logged report to update the same, we will update as soon as possible. 
Subburaj Pandian V  


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