DataContextChanged and SelectedPageChanged

Wizard for WPF Forum

Posted 15 years ago by John Lanpheer
Version: 4.5.0486
Avatar
Hi,

Can someone tell my why when I'm moving to the next page in the wizard, even if I've visited the next page before, the data context gets reset on the controls?

Also, why does the SelectedPageChanged event happen before the data context changes?

I have a custom control that has a custom error display mechanism, which clears the displayed error when the data context changes. Thus, the user loses their errors if they go back and forward again. I tried to fix by revalidating on SelectedPageChanged, but this happens before the data context changes.

Ideas? Thanks in advance...

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi John,

We don't reference DataContext or DataContextChanged at all in the Wizard product. So it's something that must be kicking in in Microsoft's code.

When a new page is selected, it gets swapped into the visual tree in place of the previously selected page. That must be triggering the DataContextChanged event in Microsoft's code.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.