none
WPF toolkit Accordion - Feb 2010 release build behaves differently than source code-based buil

    Question

  • I'm investigating the possible use of the WPF Toolkit Accordion control in a project.

    While doing this, I'm attempting to change the AccordionButton style. I'm doing that by basically taking the style definition from the source code's Controls.Layout.Toolkit Themes/Generic.xaml and putting it into my own ResourceDictionary, which I then include in my App.xaml as a merged resource dictionary. Unfortunately, no matter what I change in the style, it has no effect on the UI. That's the first problem.

    In order to debug this, I'm now attempting to use the source code of WPFToolkit and Controls.Layout.Toolkit, but when I do that, the Accordion no longer shows the proper selection/expansion behavior. The first item in a three-item-accordion is properly expanded and selected on app startup, but when I try to select the second item, the third item is expanded, while the second item's selection arrow is rotated.

    So two questions, actually: Do I need to override the AccordionButton style in a different way, and why does the Accordion behave differently when I reference the installed WPF Toolkit binaries (Feb 2010 release) versus when I add them as source code (Change Set 40156 from wpf.codeplex.com) to my solution and reference them that way?

    -Oluf

    Monday, April 30, 2012 8:07 PM

All replies

  • Hi Oluf,

    Could you help me to repro this behavior on my side, and then I will do my best to find the casue of this issue.

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 03, 2012 2:41 AM
  • Hi Sheldon,

    I've created a simple reproduction VS2010 solution, but it looks like I can't attach it here on the forum. It's contained in a 1270 KB zip file.

    Edit: I've posted the file to my SkyDrive. Get it here: https://skydrive.live.com/redir.aspx?cid=9fc348c7ad23d61a&resid=9FC348C7AD23D61A!203&parid=9FC348C7AD23D61A!112&authkey=!AIrXwZJhRLAk3sg

    There are four projects in the solution:

    WpfAccordionBinRefs, WpfAccordionSourceRefs, WPFToolkit and Controls.Layout.Toolkit

    The last two are the source code of the WPF Toolkit from CodePlex, February 2010 and are included for ease of reproduction. Note that you still need to have the WPF Toolkit installed on your system for the first project to work.

    WpfAccordionBinRefs references the WPF Toolkit binaries from the installed location on your hard drive. Here the Accordion Control works just fine. Select any header and the corresponding accordion will open and show its content.

    WpfAccordionSourceRefs references the two other WPF Toolkit projects included in the solution, resulting in an assembly that's linked against the output of the two source code projects: WPFToolkit and Controls.Layout.Toolkit. Here the Accordion Control does not work properly. For example select the second header, and you will see the third accordion open, while the second header's open/close arrow is animated. What should happen is that the second accordion opens and not the third one. Also try clicking on the thrid header. Now the second header's open/close arrow gets animated to the closed position and the third header's open/close arrow is animated to the open position.

    I think that about covers it. Let me know if you can not reproduce the issue.

    -Oluf




    • Edited by Oluf at HP Friday, May 04, 2012 3:30 AM Small update to description
    Friday, May 04, 2012 3:06 AM