Where can I get themes for WPF controls that resemble the Visual Studio 2010 interface?

My application is built around AvalonDock, which has a good skin of Visual Studio 2010 (which is much more beautiful than all other skins). Now I would like to attach the rest of my application to go with it. I am more interested in the following parts:

  • Toolbar . I basically managed to get the colors right on their own, but the VS toolbars are still prettier.
  • (contextual) menu - VS has a blue field for focus, which is replaced by a pleasant orange, which makes the application much warmer and friendlier.
  • The background of the main window is one thing that AD did not work with.

Are these styles somewhere on the internet? Or can they be somehow extracted from VS?

Thanks for any help.

+7
source share
1 answer

When I had the same goal, I used Reflector (with the BAML Viewer add-in ) and this color editor

Styles and templates of VS controls are located along the path (Path of VS2010)\Common7\IDE\en\ . The required file is Microsoft.VisualStudio.Shell.UI.Internal.resources.dll

If you deploy this library to the BAML Viewer, there will be many files, but the most useful are listed in the themes / generic.xaml file.

It:

  • Styles / MainWindowStyle.xaml - layout of the main window.
  • Styles / CommandMenuStyle.xaml - styles of the menu, toolbar, drop-down list.
  • Styles /StandardContextMenuStyle.xaml - style of the context menu.

For example, if you open MainWindowsStyle.xaml, you will find this code:

 <Setter x:Uid="Setter_26" Property="Background" Value="{DynamicResource {x:Static EnvironmentBackgroundGradientKey}}" /> 

Now install the VS Color theme editor, in Visual Studio open Theme โ†’ Customize Colors โ†’ Default. enter image description here The EnvironmentBackgroundGradient key has 4 items in the list. It can be written as follows:

 <LinearGradientBrush x:Key="EnvironmentBackgroundGradient" StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Color="#293955"/> <GradientStop Color="#35496a" Offset="0.5"/> <GradientStop Color="#35496a" Offset="0.5"/> <GradientStop Color="#293955" Offset="1"/> </LinearGradientBrush> 

Perhaps these colors are explained somewhere in detail, but I did not find this, so I used Reflector.

Other builds that may be useful:

  • com \ Microsoft.VisualStudio.Platform.WindowManagement.resources.dll - TabControl and DockManager styles
  • PrivateAssemblies \ Microsoft.VisualStudio.ExtensionsExplorer.UI.dll - select a new project

And here is TabControl with VS2010, which I implemented earlier. It does not have the same functionality, but it looks the same.

+12
source

All Articles