GoToPage WizardCommand not firing

Wizard for WPF Forum

Posted 11 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 11 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 11 years ago by Matt Swanton
Avatar
Yes - that has done the trick.

Thanks for the quick response.

Matt
The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.