When overriding WPF templates do I have to override each theme's template separately?

牧云@^-^@ 提交于 2019-12-01 06:40:35

One thing to keep in mind is that once you create a ControlTemplate for you control, you are replacing the entire ControlTemplate.

From: http://msdn.microsoft.com/en-us/library/ms745683.aspx

What I gather from that is no, there is no way to replace portions of a template. The template is considered a single unit. However, there may be ways to customize your template to allow changes via styles (which can be based on other styles).

If MS makes a new theme, then you will have to update your own custom control templates to implement a similar theme. Remember, you're replacing, not enhancing the control template.

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