这两种设置样式的TargetType的方法有区别吗?
<Style TargetType="Grid"></Style>
<Style TargetType="{x:Type Grid}"></Style>发布于 2013-12-19 22:27:34
没有什么不同。您只是显式地添加x:Type属性。默认情况下,WPF使用您在TargetType中添加的{x:Type }解析它。
编辑:
当您使用自定义控件时,您希望解释地设置{x:Type CustomControl}
https://stackoverflow.com/questions/20692859
复制相似问题