Ristogod
Ristogod

Reputation: 1005

WPF Control Similar to Accordion/Panels, with a single separating clickable bar

I'm trying to find a control, or the means to write one that works some what similar to how an Accordion control works. This is how it should work in detail.

If I have a window showing a view, and I'd want to change to the alternate view, there would be an bar that runs along the right side of the window. This bar would be similar to how a panel header works in a panel control. As an example, it could display "View 2" in text on the bar, indicating that if the user clicks on the bar that View 2 would be displayed.

Upon clicking the bar, it would slide from right-to-left, completely across the window, revealing View 2 from behind it. Upon reaching the left side of the screen, the text on the bar would change and now say "View 1", indicating that if the user clicked again, that they would be returned to View 1 as the bar slid back across the screen returning to it's original position on the right.

Upvotes: 1

Views: 2713

Answers (1)

Kelly
Kelly

Reputation: 7193

Basically this view is similar to how the XBox displays views.

Here is an example of doing this vertically. Should be able to easily modify it work horizontally.

http://asimsajjad.blogspot.com/2009/06/jquery-accordion-using-wpf-animation.html

In System.Windows.Controls.Layout.Toolkit.dll There is also an AccordianItem control that does this.

Upvotes: 2

Related Questions