outlookvstooutlook-addinoffice-addinscustomtaskpane

VSTO Outlook: Change border and header background color of custom task pane


I have an VSTO Outlook Add-in. I have put a custom task pane at the top. This custom task pane contains an WPF user control.Now I am trying to change the background color of the header (title bar) and borders of the custom task pane (I am not referring to the background of the WPF user control). Is it possible? If so how?


Solution

  • No, it is not. The Office extensibility model doesn't provide anything for that out of the box. You may try using the Windows API functions for that, at lease you can inject your own form. Such forms MS calls Adjucent Outlook windows. Note, you need to have a deep understanding of Windows API to move that way, see SetWindowsHookEx.

    Also you may take a look at Add-in Express based form regions and views, see How to add a custom header to your Outlook form or task pane: C# and VB.NET for more information.