mysteryx93 / HanumanInstitute.MvvmDialogs

Library simplifying the concept of opening dialogs from a view model when using MVVM
MIT License
173 stars 9 forks source link

Using the wrong ViewLocator #32

Closed Hakoyu closed 8 months ago

Hakoyu commented 8 months ago

I registered the view with the view model after constructing the ViewLocator However, it is not used correctly when displaying dialog.

The view model is correctly registered in the IDialogService, and the dialog is displayed with the registered contents. However, when the Locate method is triggered, Registrations is empty.

Honeycam 2024-02-21 23-03-35

If I register it in the constructor, it displays correctly. Honeycam 2024-02-21 22-58-25

Hakoyu commented 8 months ago

Oh, I know why. Because the ViewLocator is set up in app.axaml, it doesn't use the ViewLocator that I've registered. image Just add the registered ViewLocator in the code. image