VisualState in abstract control

≡放荡痞女 提交于 2019-12-10 10:19:44

问题


I have an abstract BaseControl that contains dependency properties as well as default style and VisualState.

I would like to use these VisualState in inherited Controls. I understand that setting the Template of the inherited control does not enable the VisualState to access the UIElement that it needs to update.

How should I proceed to properly use these VisualStates? (copy paste the VisualState in the XAML of each inherited control is not an option for me).

Is it possible to access the Template of a base control from an inherited control? Is there any in code solution?

Any help is greatly appreciated.

来源:https://stackoverflow.com/questions/18921294/visualstate-in-abstract-control

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