Hi,
据我了解,这是和windows主题有关, WPF控件样式默认使用系统的样式。在你重写模板的时候,尽量避免使用类似下面的样式,你要自己定义边距,边框,填充,字体等。
Background="{TemplateBinding Background}"
如果设置每个控件模板太麻烦,你也可以使用一些三方的扁平化的控件库。参考下面的文档:
https://stackoverflow.com/questions/38830996/wpf-windows-7-vs-windows-10-appearance
另外,WPF在所有Windows版本中都附带了标准的Windows主题,所以你可以给你的程序应用某一风格的主题。
https://stackoverflow.com/questions/2075720/windows-7-theme-for-wpf
https://stackoverflow.com/questions/33865492/authentic-windows-7-theme-in-windows-10
Sincerely,
Bob
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.