I recently had a comment from one of my subscribers about an issue they were having with their Prism dialog window not working. As you may already know, Prism provides a built-in dialog service which allow you to display custom dialogs to your end-users. Not only that, but you can also provide your very own custom dialog window.
In this scenario. Aniq was using a 3rd party control library call ModernWPF as his custom dialog window. He properly registered both is dialog and his dialog window with Prism. When he would invoke the dialog service to show the dialog using his custom dialog window, the dialog window would show, but or some reason when closing the dialog window the dialog window not working. meaning the dialog service callback was not being invoked.
Aniq sent me his WPF Prism application showing the dialog window not working, and asked if I could fix it. Of course I will. In fact, we will fix it together.
I hope you enjoy this Holiday inspired episode of “I’ll Fix your Code” in which we solve the question, “Why is the Prism dialog window not working?”.
a similar question, but using Material Design for XAML Toolkit. The toolkit implements a “DialogHost” that’s something like the DialogService in Prism. Do you think there is a way to mix the two approaches?
See here for the Material Designa in XAML Toolkit samples:
Sure, you could try to modify the existing dialog service, or just write your own and register it with Prism.
Brian awesome video. Is there any way you can post the source code for the sample project you were working with in this video? There are some things not shown in the video that are preventing me from recreating the project. I too am trying to integrate ModernWPF with my Prism project and I would love to understand how Anik did it.
I’m sorry, but I don’t have the code any longer. I deleted it after recording the video.