Click here to Skip to main content
15,390,470 members
Articles / Programming Languages / C#
Posted 6 Dec 2006


211 bookmarked

Office 2007 ToolStrip Renderer

Rate me:
Please Sign up or sign in to vote.
4.90/5 (73 votes)
6 Dec 20062 min read
Use a custom tool strip renderer to achieve the Office 2007 look and feel.

Sample Image


With the release of Office 2007, you will want to update your applications with the latest look and feel. With .NET 2.0, this is a simple process as you just need to use this custom renderer for the ToolStrip manager. Assign the custom renderer to the ToolStripManager.Renderer property, and it will customize the appearance of all ToolStrip, MenuStrip, StatusStrip, and ContextMenuStrip instances in your application.

Using the Custom Renderer

To make use of the custom renderer, you need to hook into the Load event of your Form. Just double click the form at design time to have the event handler for the Load event auto generated. Then, you need to add just this single line of code...

private void Form1_Load(object sender, EventArgs e)
   ToolStripManager.Renderer = new Office2007Renderer();

There are a couple of other steps you might need to take at design time. If you are using a StatusStrip, then you need to update the render mode because, by default, it will not use the global one specified in the line of code above. So for each StatusStrip, you just need to click the smart tag and set the RenderMode to be ManagerRenderMode. Likewise for any ToolStripContainer that is created, just left click in the center of the container area, and then look in the Properties window for the RenderMode and again change it to ManagerRenderMode.

Points of Interest

I would have made the context menu have rounded corners just like Office 2007, but this is not possible because of the way the tool strips have been implemented. The background of the context menu is always drawn in a color that takes up the entire client area of the popup window. So it was not possible to simulate a rounded corner by not drawing the corner pixels. I could not find a way to set a region for the popup window either. Maybe someone else will have better luck.


This custom renderer was created as part of the development process of adding the Office 2007 appearance to the Krypton Toolkit. The Krypton Toolkit is a free set of controls for .NET 2.0 Windows Forms applications. It implements the full Office 2007 appearance for all of its controls including buttons, panels, headers, and so forth. You can download the free toolkit from here.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Phil. Wright
United Kingdom United Kingdom
Founder of Component Factory and currently working on developing professional user interface controls for VS2005 and .NET2.

You can check out our Krypton Toolkit free library at

Comments and Discussions

QuestionHow to change String flags on text rendering Pin
hackerspk10-Nov-12 7:41
Memberhackerspk10-Nov-12 7:41 
QuestionI need your permission Pin
MaximilianReisch10-Oct-10 1:33
MemberMaximilianReisch10-Oct-10 1:33 
GeneralMy vote of 5 Pin
ISharp29-Aug-10 23:03
MemberISharp29-Aug-10 23:03 
GeneralDisabled image contextMenu issue Pin
borchanii14-Jul-09 1:42
Memberborchanii14-Jul-09 1:42 
QuestionLicensing inquiry Pin
2twotango10-Feb-09 2:04
Member2twotango10-Feb-09 2:04 
GeneralText Color Pin
Member 19405983-Oct-08 4:25
MemberMember 19405983-Oct-08 4:25 
GeneralVb2008 version of Office2007Renderer... no MenuItembackground Pin
dherrmann11-Jun-08 23:26
Memberdherrmann11-Jun-08 23:26 
GeneralRe: Vb2008 version of Office2007Renderer... no MenuItembackground Pin
AngleV22-Jun-08 0:30
MemberAngleV22-Jun-08 0:30 
GeneralRe: Vb2008 version of Office2007Renderer... no MenuItembackground Pin
AngleV22-Jun-08 2:28
MemberAngleV22-Jun-08 2:28 
GeneralSmall bug... Pin
pimb27-May-08 2:28
Memberpimb27-May-08 2:28 
QuestionAnother bug? Pin
Lex Li17-Feb-08 18:43
professionalLex Li17-Feb-08 18:43 
GeneralTo prevent background flicker... Pin
JeremyHill3-Jan-08 15:43
MemberJeremyHill3-Jan-08 15:43 
GeneralGreat Component Pin
Chuck Catron20-Sep-07 8:49
MemberChuck Catron20-Sep-07 8:49 
GeneralYou can check out our Krypton Toolkit free library at .... Pin
caddzooks21-Aug-07 1:32
Membercaddzooks21-Aug-07 1:32 
GeneralRe: You can check out our Krypton Toolkit free library at .... Pin
AbsCode21-Aug-07 7:00
MemberAbsCode21-Aug-07 7:00 
GeneralRe: You can check out our Krypton Toolkit free library at .... Pin
ComponentPhil21-Aug-07 15:28
MemberComponentPhil21-Aug-07 15:28 
GeneralRe: You can check out our Krypton Toolkit free library at .... Pin
Member 871442129-Nov-13 5:34
MemberMember 871442129-Nov-13 5:34 
QuestionHow about licence? Pin
CodeDriskis6-Aug-07 3:07
MemberCodeDriskis6-Aug-07 3:07 
GeneralRe: How about licence? Pin
Lex Li22-Feb-08 2:21
professionalLex Li22-Feb-08 2:21 
GeneralRe: How about licence? Pin
MaximilianReisch10-Oct-10 1:36
MemberMaximilianReisch10-Oct-10 1:36 
GeneralRe: How about licence? Pin
MaximilianReisch10-Oct-10 1:37
MemberMaximilianReisch10-Oct-10 1:37 
QuestionRender tab Pin
thachvv1824-Jul-07 5:38
Memberthachvv1824-Jul-07 5:38 
AnswerRe: Render tab Pin
jpmsoft14-Jul-08 15:10
Memberjpmsoft14-Jul-08 15:10 
Questionslow draw Pin
thachvv1817-Jul-07 8:20
Memberthachvv1817-Jul-07 8:20 
Questionhow to renderer progressbar on status strip Pin
Abolfazl Khusniddinov5-Jun-07 3:03
MemberAbolfazl Khusniddinov5-Jun-07 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.