VisualState in abstract control

2019-05-16 00:07发布

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.

0条回答
登录 后发表回答