Sunday, October 29, 2006

An Office 2007 style Ribbon in WPF?

For a while now I have been working on reproducing an Office 2007 Ribbon style application in Windows Presentation Foundation (WPF). This includes not just the ribbon itself, but also the full window chrome.

Whilst the official documentation has been in progress, blogs have been a great alternative source of information. However now I thought would be a good time to start my own blog discussing, amongst other things, how I am writing my Ribbon control.

Hope over the coming months you enjoy my posts and find something of interest to your own development needs. I'll focus on some of the issues that I have encountered, and will post some images of the fully working Ribbon control.

Technorati tags: ,

2 comments:

Damian said...

Andy, I'm working on an application in which I need gradients for that are Office2007 style in particular the selected and focused item gardients. Do you have any guidance on this?

Unknown said...

Damian,

A lot of the Office 2007 controls, in particular the buttons themselves, are quite complex gradients consisting of a mixture of linear and radial gradients. That said, you are not far off with a simple linear gradient.

Once you have made a rough guess of what positions the gradient-stops are, there are two good ways of getting the colour codes. The first is to get a screen grab and zoom into the desired are with a graphics app (I favour Paint.Net) then use the eyedrop tool to get the required values. If you are targeting WPF, Expression Blend is a great help as it even has a "gradient eyedropper" tool. This you just need to drag across the desired gradient and it will create everything for you.

PS. I'll probably post about Expression Blend in the near future.