我想知道ButtonChrome用于其各种状态的画笔.我尝试将ButtonChrome放在窗口中,然后在调试中断时查看其Background属性.即使内部涂有某种东西,背景也为空.如何 我可以确定使用的刷子吗?
I want to know the brushes used by ButtonChrome for its various states. I tried placing a ButtonChrome in a window, then looking at its Background property in debug break. The background was null, even though the interior was painted with something. How can I determine the brushes used?
账单
Bill Swartz
Bill Swartz
推荐答案
问题是背景很可能是从可视树中继承的.
The problem is that the Background is likely being inherited from up the visual tree.
我(个人)只是使用Snoop( snoopwpf.codeplex/)在运行时进行检查,然后获取画笔设置. 我发现它比我自己处理它容易得多.
I (personally) just use Snoop (snoopwpf.codeplex/) to inspect it at runtime, and get the brush settings. I find it far easier than handling it myself.
更多推荐
ButtonChrome.RenderPressed == true时使用的画笔
发布评论