VSIX extension WPF styles

耗尽温柔 提交于 2020-01-02 05:21:14

问题


I'm building a VS2010 extension (vsix) with WPF. Is there any way to reuse WPF style templates from the visual studio itself to make my control look native to Visual Studio?

A the moment I can use expressions for brushes like this:

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

That's not enough, however. Can I apply a style to the whole TabControl or Label?


回答1:


You can use the the techinqe you mentioned, I found these links (also)

User Interfaces: http://msdn.microsoft.com/en-us/library/bb165108(v=vs.110).aspx

Internal settings query: http://msdn.microsoft.com/en-us/library/bb164716(v=vs.110).aspx

But they don't mention other than the queryable settings, to customize your style alike.



来源:https://stackoverflow.com/questions/13146629/vsix-extension-wpf-styles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!