GoToPage WizardCommand not firing

Wizard for WPF Forum

Posted 16 years ago by Matt Swanton
Avatar
Hi,

I'm using WizardCommands.GoToPage to move from one wizard page to another once a long running process (an import) has finished executing.

Sometimes the GoToPage is not firing and I'm not sure why. When I call CanExecute from the GoToPage command it returns false.

The code I am using is below, the page does exist and this sometimes works.
WizardCommands.GoToPage.Execute("importCompletePage", null)

Is it possible to let me know what conditions exist that can prevent the GoToPage from executing? I looked in the help docs but couldn't see anything on this on the Command Model page.

Many thanks
Matt

Comments (2)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Matt,

I think the problem here is that you pass a null target to Execute. This means that it will start the command at the currently focused element and bubble up. So if the focused element is outside the Wizard (like say its containing Window), then your command will be false. If you specify the Wizard itself as the target in Execute, I bet it will consistently work.


Actipro Software Support

Posted 16 years ago by Matt Swanton
Avatar
Yes - that has done the trick.

Thanks for the quick response.

Matt
The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.