Free WPF Ribbon that’s MS-PL and includes the C# Source – With BreadcrumbBar, CollapsiblePanel and ExplorerBar WPF controls thrown in for flavor too
The Odyssey RibbonBar is the next WPF control to be added to the Odyssey Control Library, available on codeplex.
After the BreadcrumbBar, ExplorerBar and OutlookBar which I previously introduced at codeproject, the Odyssey BreadcrumbBar is the next Control included in the Odyssey Library. I'm aware of Microsofts WPF RibbonBar which is available as full functional preview and will be added to .NET 4.0. So you may wonder why I wrote an own RibbonBar anyway. The answer is, it's fun and interest to do this. And I also have in mind to build a Silverlight version.
Since the BreadcrumbBar is a set of various controls, it would fill a whole book to explain every detail, so I reduce it to the most important issues of the RibbonBar.
The demo application contains the xaml for a RibbonBar that demonstates most of the features. I did not create a demo that does something usefull nor does it have useful button images or labels. The Images I use for the demo are the free images available at www.glyphx.com
The BreadcrumbBar contains tabs that contain groups. Each group can contain any possible control. However, dynamic sizing is only applied when it contains IRibbonControls.
Currently, there are the following IRibbonControls:
“A collection of WPF and ASP.NET controlsWPF
- coming soon: WPF RibbonBar
an ASP.NET AJAX server control with node templates, context menu and event driven node template selection
I love the statement, “So you may wonder why I wrote an own RibbonBar anyway. The answer is, it's fun and interest to do this.” A man after my own heart. Why do we code? Because it’s FUN! Dugh! :P
If you liked this article, make sure you check his others too;
This is a Vista like breadcrumb bar for WPF that supports
HierarchicalTemplates, population on demand, dynamic path conversation, and many more.
BreadcrumbBaris part of a free WPF control library named Odyssey that I'm currently developing just for fun. It is similar to the Vista breadcrumb bar, hence it is actually a multi-control bar consisting of the breadcrumb part, an editable
ComboBox, a progress bar, and a button area.
Outlookbaris the third control included in Odyssey.dll, a WPF control library for free that is currently under development.
Articles about the other two controls, the
ExplorerBar, with animated collapsible panels are already available here on CodeProject (see the History section for links).
Using the code
Outlookbaris the third control included in Odyssey.dll, a WPF control library for free that is currently under development. Articles about the other two controls, the
ExplorerBarwith animated collapsible panels are already available here on CodeProject.
OutlookBaris - as the name already indicates - a sidebar control that looks like the bar in Outlook. The
OutlookBaris a container for
OutlookSections to show each section as a button and the content of the selected section. …”
This is a WPF Explorer Bar similar to the Explorer bar in Windows XP. An explorer bar usually contains one ore more collapsible panels, as shown above.
Using the code
WPF offers very nice animation features to allow almost anything you can imagine. Unfortunately, for a generic panel that supports animation while expanding/collapsing, it's not just as simple as defining
Heightproperty. Although it would work for
ScaleTransform.ScaleY, the effect would be different to what we see in XP. Therefore, I use a custom
Decoratorcontrol, which, in a few words, is a panel that can contain only one child. The
IsExpandedproperty that specifies whether the decorator is expanded or collapsed. To perform the animation, I added a helper property named
YOffsetthat will be animated.
YOffsethas a range from 0 to the
ActualHeightof the decorator, and is used at
MeasureOverrideto perform the animation