Skip to content

Conversation

@ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

update

What is the current behavior?

A IActivatableViewModel ViewModel would not trigger any events unless WhenActivated exists in the View

What is the new behavior?

Introduced parameterless constructors in ReactivePage, ReactiveUserControl, and ReactiveWindow that call WhenActivated with a no-op. This ensures that IActivatableViewModel logic in the ViewModel is triggered when the view is activated, improving consistency and activation handling in WPF views.

What might this PR break?

If no WhenActivated has been created then the current code would not execute, from now on it would be triggered correctly.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

Introduced parameterless constructors in ReactivePage, ReactiveUserControl, and ReactiveWindow that call WhenActivated with a no-op. This ensures that IActivatableViewModel logic in the ViewModel is triggered when the view is activated, improving consistency and activation handling in WPF views.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants