Mat*_*ský 7 wpf styling wpf-controls avalondock
我的应用程序是围绕AvalonDock构建的,它具有相当不错的Visual Studio 2010外观(比其他所有外观更漂亮).现在我想为我的应用程序的其余部分设计样式.我对以下部分最感兴趣:
这些风格是在网络上的某个地方吗?或者它们可以以某种方式从VS中提取出来?
谢谢你的帮助.
vor*_*olf 12
当我有相同的目的时,我使用了Reflector(带有BAML Viewer加载项)和这个颜色编辑器
VS控件的样式和模板位于路径中(Path of VS2010)\Common7\IDE\en\.必要的文件是Microsoft.VisualStudio.Shell.UI.Internal.resources.dll
如果要在BAML Viewer中展开此库,将会有许多文件,但最有用的文件列在文件themes/generic.xaml中.
他们是:
例如,如果您打开MainWindowsStyle.xaml,您将找到以下代码:
<Setter x:Uid="Setter_26" Property="Background" Value="{DynamicResource {x:Static EnvironmentBackgroundGradientKey}}" />
Run Code Online (Sandbox Code Playgroud)
现在安装VS Color主题编辑器,在Visual Studio中打开主题 - >自定义颜色 - >默认.
密钥EnvironmentBackgroundGradient在列表中有4个项目.它可以用以下方式编写:
<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>
Run Code Online (Sandbox Code Playgroud)
可能这些颜色在某处详细解释,但我还没有找到,所以我使用了Reflector.
另一个有用的程序集:
而这里是TabControl用VS2010的样子,我已经更早实现.它没有相同的功能,但看起来一样.