Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CD303 - The 2007 Microsoft Office System: Developer Model for the New User Interface Alex Mogilevsky Architect Microsoft Corporation Savraj Dhanjal Program."— Presentation transcript:

1

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

3 The New User Interface Access, Excel, Outlook, PowerPoint, Word

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

5 Agenda Existing solutions RibbonX Details Demos Migrating existing solutions ConclusionQuestions

6 Agenda Existing solutions RibbonX Details Demos Migrating existing solutions ConclusionQuestions

7 Existing Solutions XLMWordBasic 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!

8 Existing Solutions Custom Menu Custom Buttons on Formatting Toolbar Custom Toolbars

9 Mapping Existing Solutions If your code added a…it appears in… control to a built-in menu the 'Menu Commands' group control to a built-in toolbar the 'Toolbar Commands' group custom toolbar The ‘Custom Toolbars’ group … on the Add-Ins Tab

10 Alex Mogilevsky Architect Microsoft Corporation Existing code works

11 Agenda Existing solutions RibbonX Details Demos Migrating existing solutions ConclusionQuestions

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

13 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

14

15

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

17 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

18 Add your own tabs Add to built-in tabs Add to the Office Menu Add to built-in contextual tabs Remove tabs, groups, controls RibbonX Basics

19 TabsGroupsButtonsMenusSplitButtonsToggleButtonsLabelsCheckBoxes RibbonX Controls

20 EditBoxesDialogBoxLaunchersDropDownsComboBoxesGalleries Only five controls in Office 2003: msoControlButton, msoControlEdit, msoControlPopup, msoControlComboBox, msoControlDropdown

21 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 <button id=“hw” label=“Hello World!” onAction=“myHelloFunc” /> </group></tab>

22 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)

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

24 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

25 Alex Mogilevsky Architect Microsoft Corporation Hello World Document

26 Features Targeting Developers StartFromScratch Global repurposing Referencing built-in controls and images

27 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

28 “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)

29 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

30 Agenda Existing solutions RibbonX Details Demos Migrating existing solutions ConclusionQuestions

31 Alex Mogilevsky Architect Microsoft Corporation Custom Group, Tab, & Gallery

32 Alex Mogilevsky Architect Microsoft Corporation Custom Office Menu Item

33 Dynamic Update via Invalidate Call Invalidate or InvalidateControl 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”); Ribbon.InvalidateControl(“MyButton”); Office queries your callback functions again.

34 Alex Mogilevsky Architect Microsoft Corporation Invalidate

35 Alex Mogilevsky Architect Microsoft Corporation Repurposing, Start From Scratch

36 Alex Mogilevsky Architect Microsoft Corporation End-User Customization

37 Alex Mogilevsky Architect Microsoft Corporation Two Excel Workbooks

38 Alex Mogilevsky Architect Microsoft Corporation Outlook, Access

39 Agenda Existing solutions RibbonX Migrating existing solutions DeploymentConclusionQuestions

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

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

42 Design Guidelines UI Region Contains… File Menu Commands External to Document Main Tabs Commands that modify Document Content Contextual Tabs Commands specific to built-in objects Programmable Task Panes Typically display data relevant to current document

43 In Office 2007…

44 Agenda Existing solutions RibbonX Details Demos Migrating existing solutions ConclusionQuestions

45 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!

46 Known Changes at Beta 2 TR tag will be tag will be tag will be in B2TR tag will be in B2TR Built-in control IDs will be significantly updated in B2TR

47 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)

48

49 Fill out a session evaluation on CommNet and Win a XBOX 360!

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


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

Similar presentations


Ads by Google