1

I built a VSPackage for VS2015. How can I get the current theme colors to color my elements appropriate? I tried things like

 xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
 Background="{DynamicResource {x:Static vsfx:VsBrushes.CommandBarOptionsBackgroundKey}}"

But that didn't work. Any help appreciated.

Thanks!

1 Answers1

0

This worked for me:

xmlns:vs_shell="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
Background="{DynamicResource {x:Static vs_shell:EnvironmentColors.CommandBarMenuBackgroundGradientBrushKey}}"

You can get the full list of colors here: Microsoft.VisualStudio.PlatformUI.EnvironmentColors

sboulema
  • 837
  • 1
  • 10
  • 22