Question

This is what WordPad looks like in Windows 7:


(source: gawker.com)

The ribbon is also in paint. Which leads me to think that the ribbon is "hidden" somewhere in a dll file that I could import into my C# apps. Is this true? If not how did Microsoft make the ribbon.

Yes I'm aware that there are already companies who have made the ribbon for C# but I want to just use P/Invoke to add it to my apps.

Was it helpful?

Solution

As Matthew Flaschen mentions, you can download a CTP of the WPF Ribbon Control from CodePlex. However, it is important to point out that this is currently very incomplete. I tried it out recently and found it to be decent, but rather buggy.

You won't be able to properly use the WPF Ribbon control (to its full extent at least) until .NET 4.0 is released. I'm not sure whether it's included in the current Beta 1, but it should (almost) definitely be part of the core WPF library in the final release. This ought to be much more stable and complete in terms of features. Whether the feature set will match that of the Microsoft Office Ribbon is another question - doubtful, in my mind, though you might expect WPF by nature to provide some sort of extensibility.

Update: Indeed, the Beta 1 release of the .NET Framework 4.0 details (in the overview section) that a WPF Ribbon control is included. Worth checking it out, as I would strongly suspect it is significantly more advanced than the one on CodePlex.

OTHER TIPS

You can use the WPF wrapper.

From what I've read, there is no Microsoft version that you can use in your own applications, with the exception of a C++ version that is part of the Visual Studio 2008 Feature Pack.

There are several .Net implementations that you can use (mainly from 3rd party vendors). Microsoft have imposed a licensing condition on using the concept of a ribbon/Office UI in your applications which you should also be aware of.

You want to look at the "Windows API Code Pack" which provides managed wrappers for a number of Windows APIs.

The Windows 7 Ribbon APIs have their own page as well, that might help you in your quest.

These are Windows 7 specific APIs that are being used to create the ribbons in WordPad and Paint. They aren't really 'hidden'. There is a decent amount of documentation, but the best material has been found in some of the videos on MSDN (I think on Channel9).

Obviously, these will not be available on earlier releases of Windows. I expect to see swift consumer adoption of Windows 7, but if you need to target a wide audience short term, you may want to consider some of the other options for right now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top