How/Where to Find Microsoft Default Styles for WPF Controls

我只是一个虾纸丫 提交于 2019-12-29 06:18:04

问题


I am looking to change the style of a control but I basically want to copy part of a default style. Does anyone know how I can figure out what the default style of a control is?

In my case I am wanting to make the column headers in a DataGrid go blue on mouse over like the row headers do.


回答1:


You can find some templates that are very close to the defaults on this MSDN site

Another alternative is to get a copy of Expression Blend and use it to make a copy of the default style, however Blend isn't free




回答2:


Contrary to what Rachel says, the link she provides does not provide the default templates.

I have seen using System.Windows.Markup.XamlWriter.Save(myObject.Template) that the default templates are completely different from what that site shows.



来源:https://stackoverflow.com/questions/9068830/how-where-to-find-microsoft-default-styles-for-wpf-controls

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