How/Where to Find Microsoft Default Styles for WPF

2019-01-24 06:20发布

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.

标签: c# wpf styles
2条回答
孤傲高冷的网名
2楼-- · 2019-01-24 07:04

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

查看更多
在下西门庆
3楼-- · 2019-01-24 07:19

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.

查看更多
登录 后发表回答