Search code examples
wpfexcelvstoadd-inribbon

Insert WPF user controls in VSTO ribbons


I develop an Excel 2007 add-In using VS 2010 and existing WPF user controls. With the aid of ElementHost it is easy to integrate the controls in task panes and windows, but I found no way to integrate them in ribbons. The Toolbox in combination with the ribbon designer contains no ElementHost and no way to insert it indirectly using WinForms user controls. Is there another way to integrate WPF user controls in ribbons?


Solution

  • You can only use Ribbon UI elements to manipulate the ribbon. There is no alternative. This is a good thing - it keeps the UI consistent across all applications. This is a common UI design pattern.