Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IExpectViewShownCallback not triggered in a ViewModel associated with a Region #364

Open
ucollina82 opened this issue Apr 11, 2021 · 3 comments

Comments

@ucollina82
Copy link
Contributor

It seems that in a ViewModel associated with a Region the event of IExpectViewShownCallback is not triggered

@ucollina82
Copy link
Contributor Author

Seems that event IExpectViewLoadCallaback instead is triggered

@mauroservienti
Copy link
Member

The problem here is that the events needed are not raised by WPF. When a view is resolved we attach the required behaviors. If the view is a window it gets a different behavior than if it's a user control.

@ucollina82 can you explain what is the need? Why there is a need for a view shown event when using regions?

@ucollina82
Copy link
Contributor Author

In this circumstance there was the need to understand when to initialize the viewmodel of a usercontrol (in a region) starting from the loading of the view.
It was then chosen to hook to the IExpectViewLoadedCallback event but if there is another way to do this in a Region, that's fine

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

No branches or pull requests

2 participants