1

Is there a way to host WPF UserControl (or Window) directly in a custom task pane, either through Office Interop or some clever HWND play etc? Has anyone done it before? Note that I know about the popular ElementHost method and have done it countless number of times before. I'm looking for somehow eliminating the need of a WinForms component.

It would help if someone could even point to an official document which confirms that it isn't possible.

This suggested duplicate asks us to use ElementHost which is precisely what I'm looking to avoid.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
dotNET
  • 33,414
  • 24
  • 162
  • 251
  • You need the component to support the WPF control. – Trevor May 07 '19 at 13:17
  • Possible duplicate of [How to Use WPF Controls Inside an Excel Actions Pane?](https://stackoverflow.com/questions/24851562/how-to-use-wpf-controls-inside-an-excel-actions-pane) – Chris May 07 '19 at 13:59
  • @Chris: Thanks for the pointer, but as I said in the post, I know how to use `ElementHost`. The very purpose of this question is to find a way of getting rid of it. Please remove the duplicate flag, as the post your have linked only shows the `ElementHost` way. – dotNET May 07 '19 at 15:25

0 Answers0