All about the SharePoint ribbon

4,135 views
3,986 views

Published on

Developers guide for customizing the SharePoint 2010 server ribbon.

Code sample is embeded in the power point, so download to get it!

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,135
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
117
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

All about the SharePoint ribbon

  1. 1. All about the SharePoint Ribbon<br />Shai Petel<br />MCT, VP R&D<br />shai@kwizcom.com<br />
  2. 2. Warning!<br />There will be extensive visual studio use throughout this presentation!<br />
  3. 3. Topics<br />Introducing the Ribbon<br />SPRibbon Architecture<br />Customizing the SPRibbon<br />
  4. 4. Introducing the Ribbon<br />Office ribbon: File menu and quick access toolbar:<br />SharePoint ribbon: Site Actions menu, Navigate Up and Edit page quick access buttons<br />
  5. 5. Introducing the RibbonCommon tabs<br />The “Browse” tab<br />The “Page” tab<br />
  6. 6. Introducing the RibbonCommon tabs<br />The “Items” tab<br />The “List” tab<br />
  7. 7. Introducing the RibbonCommon tabs<br />“On demand” functionality with contextual tabs<br />
  8. 8. Introducing the RibbonCommon tabs<br />Context-sensitive operations with controls status<br />
  9. 9. Topics<br />Introducing the Ribbon<br />SPRibbon Architecture<br />Customizing the SPRibbon<br />
  10. 10. SPRibbonArchitectureObjects Hierarchy<br />
  11. 11. SPRibbonArchitectureObjects Hierarchy<br />
  12. 12. SPRibbon ArchitectureObjects Hierarchy<br />Objects are defined in XML or in JSON.<br />Example:TEMPLATEGLOBALXMLCMDUI.XML<br />(Humans prefer XML…)<br />
  13. 13. SPRibbonArchitectureRibbon Communication<br />
  14. 14. Topics<br />Introducing the Ribbon<br />SPRibbon Architecture<br />Customizing the SPRibbon<br />
  15. 15. Customizing the SPRibbonGeneral info<br />Declaring controls<br />Handling commands<br />Associating your ribbon tabs<br />
  16. 16. Customizing the SPRibbonGeneral info<br />Declaring controls<br />Declare Ribbon controls in feature XML<br />Injext XML to SPRibbon using ribbon.RegisterDataExtension<br />Handling commands<br />Associating your ribbon tabs<br />
  17. 17. Customizing the SPRibbonGeneral info<br />Declaring controls<br />Handling commands<br />Declare command handlers inline in the XML<br />Register a PageComponent to handle more complex commands (such as lazy load)<br />Associating your ribbon tabs<br />
  18. 18. Customizing the SPRibbonGeneral info<br />Declaring controls<br />Handling commands<br />Associating your ribbon tabs<br />Associate with a list template or content type<br />Use code to bring un-associated tabs to view<br />Associate web part with contextual group tabs<br />
  19. 19. Customizing the SPRibbon<br />Code + demo<br />(See demo script in README.txt inside VS project)<br />
  20. 20. Nice to know…<br />Use JS objects to avoid conflicts<br />The ribbon shows informative formatting errors 9 times out of 10<br />
  21. 21. Nice to know…<br />Some controls cannot be large / medium / small. Checkbox cannot be large.<br />If you inject to existing node (_children) you can only inject one child at a time. Create CommandUIDefinition for each injection.<br />Documentation error: group template and template alias are not optional!<br />
  22. 22. Nice to know…<br />SPRibbon in not accessible from sandboxed code!<br />Dispatch command manually: SP.Ribbon.PageManager.get_instance().get_commandDispatcher().executeCommand(Commands.CommandIds.ApplicationStateChanged, null);<br />
  23. 23. Topics<br />Introducing the Ribbon<br />SPRibbon Architecture<br />Customizing the SPRibbon<br />
  24. 24. See also<br /> Server Ribbon visual studio extensibility project: http://code.msdn.microsoft.com/vsixforsp<br />PageComponent more info:http://msdn.microsoft.com/en-us/library/bb383792.aspx<br />Shai's Blog:http://kwizcom.blogspot.com<br />Chris O'Brien ribbon blog (Beta!) can be found here: http://www.sharepointnutsandbolts.com/2010/01/customizing- ribbon-part-1-creating-tabs.html<br />MSDN How-To Webpart with contextual ribbon: http://msdn.microsoft.com/en-us/library/ff407578.aspx<br />
  25. 25. Questions?<br />=2B |! 2B ? FullTrust:Sandbox;<br />

×