views:

15

answers:

0

I'm trying to create a custom combobox that shows a loading animation when a bool property is set on it (e.g. IsLoading).

I've created a control template in Blend based on the combobox, and added a textblock inside the togglebutton template. In the code behind I'm calling VisualStateManager.GoToState but it always returns false. I was trying to move to a custom state initially, but I can't even move to states such as Disabled or MouseOver.

I have a usercontrol that just contains a combobox and the style is set to my combobox style containing the control template. I presume GoToState fails because the state is not on the control itself, but inside the combobox. How can I access this?

I'm at a loss as to how to debug this as there are no errors.

thanks