210 likes | 480 Vues
PC14. Introducing T he Windows Scenic Ribbon. Nicolas Brun Senior Development Lead Microsoft Corporation. Office 2007 Ribbon. Office Button. Contextual Tab Set. Help. Tab. Quick Access Toolbar. Contextual Tab. Dialog Box Launcher. Group (aka “Chunk”). Windows Scenic Ribbon.
E N D
PC14 Introducing The Windows Scenic Ribbon Nicolas Brun Senior Development Lead Microsoft Corporation
Office 2007 Ribbon Office Button Contextual Tab Set Help Tab Quick Access Toolbar Contextual Tab Dialog Box Launcher Group (aka “Chunk”)
Windows Scenic Ribbon • In-box with Windows 7, redistribution available to Vista • Win32 API, COM-based (targets native developers first) • Feature parity (or close) with Microsoft Office 2007 Ribbon Application Menu Help Contextual Tab Set Tab Quick Access Toolbar Contextual Tab Dialog Launcher Group (aka “Chunk”)
demo Windows 7 Paint
video Should I use a Ribbon?
Should I Use A Ribbon? • Important: What type of application am I? • Some great advantages • Rich ways to present your features • Enhances command discoverability • Excellent user reviews/intuitive and easy to learn • Looks slick—a chance to revitalize your application! • Excellent Resource: Ribbon Guidelineshttp://msdn.microsoft.com/en-us/library/cc872782.aspx
The Ribbon LandscapeSoftware vendors have diverse needs WPF MFC Scenic Target: Managed Target: MFC native Target: Native needs .NET 3.5 Win2K or newer Vista or newer Office 2007 & Windows styles Office 2007 & Windows styles1 Windows visual style Coming soon…Official release in 2009 Available now in Visual Studio 2008 SP1 Coming soon… Ships with Windows 7 Microsoft’s Ribbon Strategy 1 Office 2007 style available now, Windows style available 2009
Windows Scenic RibbonKey platform goals • Challenging to author Windows UI in Win32 • Following guidelines takes effort • Goal 1 • Provide a great authoring story • Goal 2 • Drive toward a consistent user experience
Architecture • Strong Model View Controller separation • Code and markup decoupling • Small C++ API surface Application-specific Business Logic void DoStuff() { … … } Windows Scenic Ribbon COM API Initialization and Events handling MyHandler::Execute(…){DoStuff();} Markup Organization of controls <Ribbon> <Tab> <Button … /> </Tab> </Ribbon>
demo Hello Ribbon
InitializationIntegrate into your application Ribbon Platform Application CoCreateInstance Initialize (HWND, IUIApplication*) LoadUI( resourceName ) OnCreateCommand IUIFramework IUIApplication
Events Handling • IUICommandHandler interface • Execute(UINT32commandId,UI_COMMAND_EXECUTIONVERB verb, constPROPERTYKEY* key, constPROPVARIANT* currentValue, IUISimplePropertySet* commandExecutionProperties) • UpdateProperty(UINT32commandId,REFPROPERTYKEY key, constPROPVARIANT* currentValue,PROPVARIANT* newValue)
demo Hello Ribbon
Combo Boxes Scenic Ribbon Controls Spinners Mini Toolbar &Contextual Menu Group Dialog Launchers Buttons & Split Buttons Color Pickers Tooltips Categorized Menus Font Control “In-Ribbon” Galleries Help Button Dropdown Galleries Tabs & Groups Check Boxes
Programming Model • Behaviors are abstracted from specific controls • Visual style automatically chosen based on location • Consistency and “basics” handled by platform • Pay for play
demo Hello Ribbon
Last WordsWindows Scenic Ribbon • Programming model • Consistency • Authoring path • Ribbon also available with MFC and WPF • Is the Ribbon for you? • Hands-on Lab at PDC
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Q&A Please use the microphones provided
nibrun@microsoft.com ryandemo@microsoft.com © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.