PDA

View Full Version : states and visualstatemanager



Wavioli
September 3rd, 2009, 01:48 PM
Anyone got any good info on these subjects, seems like theres nothing out there at all of any use.

Basically we're trying to change the state of a control when a certain event happens (in this case a page scanning or a document uploading)

We've managed to change the states though blends built in gotostateAction through a mouse click, but we cant get it to change (well we have but it doesnt change visually, which is kinda the whole point!)

any clues would be much appreciated!

Wav

kirupa
September 3rd, 2009, 03:44 PM
In the code behind, you can add some code that looks similar to the following: VisualStateManager.GoToState("statename", true);

That will allow you to create custom states and have them be triggered at a certain point in time. You can even use the GoToStateAction behavior if you want as well.

I will write a tutorial about this shortly, for this is a good topic that (I agree) hasn't gotten much coverage.

Cheers!
Kirupa