Welcome to MSDN Blogs Sign in | Join | Help

News

  • who's online visitors here with you. Programming Microsoft® Office Business Applications Locations of visitors to this page
    Bookmark and Share
    Erika Ehrli on Twitter MSDN_Office in Twitter Follow us on Twitter
    MSDN_Office in Facebook Join MSDN Office on Facebook
Office Fluent UI (Ribbon): New Visual Studio Code Snippets and Office Visual How-to Series

The new Microsoft Office Fluent UI replaces the previous system of layered menus, toolbars, and task panes with a simpler system optimized for efficiency and discoverability. The new UI, including the Office Fluent Ribbon, provides improved context menus, enhanced screen tips, a Mini toolbar, and keyboard shortcuts that help to improve user efficiency and productivity. The new Office Fluent UI is implemented in several applications in the 2007 Microsoft Office suite, including Access, Excel, Outlook, PowerPoint, and Word.

You can extend the Ribbon using XML and one of several conventional programming languages to manipulate the components that make up the Ribbon UI. To extend the Ribbon you use different callback signatures depending on the control types. We have seen a lot of questions related to this subject. For instance, onAction for a gallery may be different from onAction for a button.

<menu xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    
<button id="dynaButton" label="Button" onAction="OnAction" imageMso="FoxPro" />
    <
toggleButton id="dynaToggleButton" label="Toggle Button" onAction="OnToggleAction" image="logo.bmp" />
    <
menuSeparator id="div2" />
    <
dynamicMenu id="subMenu" label="Sub Menu" getContent="GetSubContent" />
</
menu>

We wanted to provide a complete set of Ribbon XML snippets for every control/callback combination, and the corresponding function definitions, so Frank Rice built over 100 snippets divided between C# and VB .NET for Excel, PowerPoint, and Word. You can combine the snippets with your VSTO project if you want to and you can find the snippets here:

Frank is currently working on a new set of Office Visual How-tos where he shows how to customize the 2007 Office Fluent User interface programmatically. You can find the first Visual How-To of the series here:

I will update this blog entry to list more as we publish them.

Frank has done a fantastic job teaching all of us how to customize the 2007 Office Fluent User interface. Make sure you visit his blog and the Office Fluent Ribbon Developer Portal.

Posted: Monday, March 26, 2007 5:30 PM by erikaehrli

Comments

Jon Peltier said:

"over 100 snippets divided between C# and VB .NET"

This is Office, isn't it? For the vast majority of the Office solutions I've developed, .NET would have been vast overhead in terms of footprint of the solution and in terms of development time. Where are the VBA examples? The user interface has been ripped out of the OM, and there are no obvious means for an Office-only (dot-net-free) solution to access it.

But then, none of my clients are rushing to adopt Office 2007, so I guess I can wait until the VBA examples are published.

# March 27, 2007 6:50 AM

frice's WebLog said:

Visual Studio 2005 code snippets are a neat way to package pieces of code that you want to keep close

# April 3, 2007 12:20 PM

Omar said:

How can I integrate the ribbon bar in my windows forms?

# April 16, 2008 2:47 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker