I am designing a usercontrol which acts as a drawer which I want to “slide out” from behind a border. I have set up the two states: “DrawerOpen” and “DrawerClosed” in the usercontrol itself and want the button visible in the mainwindow of my UI to open/close this drawer. These two mutually exclusive states are in the same Visual State Group.
I have added the “GoToStateAction” to the button in the usercontrol (which houses several other controls and visual state groups). The state “DrawerOpen” simply consists of a margin change that brings the usercontrol fully into view. I believe everything is set up correctly, but can’t for the life of me figure out why clicking the button simply won’t change the state as it is defined to do in the properties of the GoToStateAction.
Does anyone have any idea why the usercontrol state is not responding to the button click? I am receiving no error message.
There also doesn’t seem to be any problem with the z-order, and the button does “Click” when selected at runtime.
Thank you!
Rachael
UPDATE
Just wanted to mention that I do believe the issue is that I need to be able to “focus” (for lack of a more precise word) on the controls and change of state behaviors within the usercontrol. Not sure if that helps any.
I actually ending up solving my issue, thank you for responding. What I did was use a toggle button to set up the boolean states of Open and Closed where “checked” corresponds to the “Open” State. It has a nice clean effect as the usercontrol is controlled by one of its own buttons, rather than a button on some layout manager of the mainwindow. It only properly runs once, however…don’t know why yet…