1 / 47

CD303 - The 2007 Microsoft Office System: Developer Model for the New User Interface

CD303 - The 2007 Microsoft Office System: Developer Model for the New User Interface. Savraj Dhanjal Program Manager Microsoft Corporation. Alex Mogilevsky Architect Microsoft Corporation. The New User Interface. Access, Excel, Outlook, PowerPoint, Word. Ribbon Extensibility - “RibbonX”.

nubia
Download Presentation

CD303 - The 2007 Microsoft Office System: Developer Model for the New User Interface

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CD303 - The 2007 Microsoft Office System: Developer Model for the New User Interface Savraj Dhanjal Program Manager Microsoft Corporation Alex Mogilevsky Architect Microsoft Corporation

  2. The New User Interface • Access, Excel, Outlook, PowerPoint, Word

  3. Ribbon Extensibility - “RibbonX” • Developers can modify the Ribbon • For example: remove tabs, add a tab, add a group

  4. Agenda • Existing solutions • RibbonX Details • Demos • Migrating existing solutions • Conclusion • Questions

  5. Agenda • Existing solutions • RibbonX Details • Demos • Migrating existing solutions • Conclusion • Questions

  6. Existing Solutions • XLM • WordBasic • CommandBars (‘96) • WLL, XLL • XLA, PPA, Word global templates • In Excel, “Init Menus” registry key • Attached Toolbars in Word & Excel • Other technologies… • And it all still works!

  7. Existing Solutions Custom Buttons on Formatting Toolbar Custom Menu Custom Toolbars

  8. Mapping Existing Solutions

  9. Agenda • Existing solutions • RibbonX Details • Demos • Migrating existing solutions • Conclusion • Questions

  10. Before Office 2007… Inconsistency across applications Office 2000 VBA Programmers Guide, MS Press, 1999

  11. Before Office 2007… • Hard to build well-behaved add-ins • Hard to reference built-in controls, images • Hard to localize • Nearly impossible to make add-in customizable by end users • Easy to have add-in conflicts • Result: UI deteriorates over time

  12. Excel, after you open a few hundred workbooks with attached toolbars…

  13. RibbonX… • Is a consistent, XML-based developer model for Office UI • Produces well-behaved solutions by default • Exposes new control types • Targets specific developer scenarios

  14. Add your own tabs Add to built-in tabs Add to the Office Menu Add to built-in contextual tabs Remove tabs, groups, controls RibbonXBasics

  15. Tabs Groups Buttons Menus SplitButtons ToggleButtons Labels CheckBoxes RibbonXControls

  16. EditBoxes DialogBoxLaunchers DropDowns ComboBoxes Galleries RibbonX Controls Only five controls in Office 2003: msoControlButton, msoControlEdit, msoControlPopup, msoControlComboBox, msoControlDropdown

  17. RibbonX Markup • Declarative XML • Easy to understand, localize, generate • Separates UI from your business logic • Gets applied to UI at add-in or document load <tab idMso=“TabWrite”> <group id=“myGroup” label=“My Group”> <button id=“hw” label=“Hello World!” onAction=“myHelloFunc” /> </group> </tab>

  18. RibbonX Entry Points • New File Format Documents (VBA solutions) • Include customUI markup as a part • COM Add-Ins (C#, C++, VB.NET, VB6) • Return customUI markup via IRibbonExtensibility interface • VSTO v3 Solutions • Same as COM • Wizard, generated code (connection, resources, images) • GUI editor (maybe – see CD308 for VSTO pans)

  19. RibbonX Solution Space COM VBA VSTO (C#, VB.NET, VB6, C++) Installed at app-level Word: Global Template, Excel (.xlam) PPT (.ppam) contains customUI part VSTO v3 Write a VSTO v3 app-level solution App. Level Word, Excel, PPT New file format document contains customUI part Access: loadCustomUI method Installed at app-level, displays UI based on doc properties VSTO v3 Write a VSTO v3 doc-based solution Doc. Level

  20. RibbonX Schema • ribbon, tab, group, box • Containers • “Find or create” model • id, idMso • Define a custom id, refer to built-in id • insertAfterMso, insertBeforeMso • Insert in relation to built-in control • image, imageMso • Define your own image, refer to a built-in image • getImage, onAction, getEnabled, getVisible • Some of the available callbacks

  21. Hello World Document Alex MogilevskyArchitect Microsoft Corporation

  22. Features Targeting Developers • StartFromScratch • Global repurposing • Referencing built-in controls and images <ribbon startFromScratch=“true”> <!– hides the main tabs --> <command idMso=“Save” onAction=“runMyCode” /> <!- takes over the built-in save action --> <button id=“x” imageMso=“Save” label=“Imposter!” /> <!- “steals” the image of the Save button -->

  23. Dynamic Update of Controls • XML is the only way to add controls • No API to add new controls at arbitrary time • State and properties are dynamic, via callbacks • getVisible, getLabel, getImage… • Galleries, dynamicMenus • Can be dynamically populated with controls • The “pull” model

  24. “Pull” Model • Questions you’ll never ask again • When is it OK to add UI? Remove? • In how many documents, windows? • Will I be called on uninstall to clean up? • Is there other code changing the same UI? • Can the user remove controls I want to change? • Can the user move or copy my controls? • No “housekeeping” code • No need to make adjustments at open, close, install, uninstall (unlike CommandBars)

  25. Status Bar Mini Toolbar Add/Remove inside built-in groups Custom group scaling Right-click (context) menus However, Existing right-click customizations work Global repurposing works for all controls Outside Scope Of RibbonX

  26. Agenda • Existing solutions • RibbonX Details • Demos • Migrating existing solutions • Conclusion • Questions

  27. Custom Group, Tab, & Gallery Alex MogilevskyArchitect Microsoft Corporation

  28. Custom Office Menu Item Alex MogilevskyArchitect Microsoft Corporation

  29. Dynamic Update via Invalidate Call InvalidateorInvalidateControl When Office updates the Ribbon, it will ask your code again for dynamic properties Markup: <button id=“MyButton” label=“My First Button” getImage=“myButtonImage” /> C#: Ribbon.InvalidateControl(“MyButton”); Office queries your callback functions again.

  30. Invalidate Alex MogilevskyArchitect Microsoft Corporation

  31. Repurposing, Start From Scratch Alex MogilevskyArchitect Microsoft Corporation

  32. End-User Customization Alex MogilevskyArchitect Microsoft Corporation

  33. Two Excel Workbooks Alex MogilevskyArchitect Microsoft Corporation

  34. Outlook, Access Alex MogilevskyArchitect Microsoft Corporation

  35. Agenda • Existing solutions • RibbonX • Migrating existing solutions • Deployment • Conclusion • Questions

  36. Migrating a Solution • Spectrum of Possibilities None Don’t change your code whatsoever. Your added buttons appear on the add-ins tab. Simple Find the right place and the right control types for your UI in the new Ribbon. Just move them to the right place. Full Rethink your UI based on the new paradigms, perhaps using gallery controls and a reorganization of your commands.

  37. Simple Migration • In Office 2003, your code added items to the tools menu.

  38. Design Guidelines

  39. In Office 2007…

  40. Agenda • Existing solutions • RibbonX Details • Demos • Migrating existing solutions • Conclusion • Questions

  41. Conclusion… • Existing solutions still work • New model is XML-based, easier to build great add-ins • Optimized for common scenarios • Consistent across applications • You can spend your time building solutions, instead of worrying about the UI!

  42. Known Changes at Beta 2 TR • <fileMenu> tag will be <officeMenu> • <advanced> tag will be <dialogBoxLauncher> in B2TR • Built-in control IDs will be significantly updated in B2TR

  43. Resources • Office Developer Center • http://msdn.microsoft.com/office/ • Ribbon Developer Center • http://msdn.microsoft.com/office/tool/ribbon • UI Blog • http://blogs.msdn.com/jensenh/ see the developer section (Thursdays)

  44. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

More Related