Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
So I am making a program in wpf using blend that required a sidebar like in the windows 10 xbox app. I have the states and when i press the hamburger icon it expands with a nice slide transition using the GoToStateAction behaviour but how do I make it that when the hamburger icon is pressed while it is in the state of expand it reduces the menu back to the side state. Anyone?
Posted
Updated 7-Aug-15 3:12am
v2

1 solution

you need to replace your GoToStateAction by something like:
VB
if ExpandedState = True then
    GoToStateAction "Reduce"
    ExpandedState = False
else
    GoToStateAction "Expand"
    ExpandedState = True
end if

I let you deal with details
ExpandedState must be a global variable
 
Share this answer
 
v2
Comments
Member 11852402 7-Aug-15 9:53am    
Ehm good idea but how do i get that state thingy cause it doesnt exist
Patrice T 7-Aug-15 10:01am    
If you can't read the state, you can create a variable that remember actual state.
the variable have to persist between calls to this piece of code.

See updated solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900