Example #1
0
        public IDialogService GetDialogService <TViewModel>(TViewModel viewModel)
        {
            var view   = locator.GetView(typeof(TViewModel));
            var window = windowProvider.Create(view, viewModel);

            window.Closed += Window_Closed;

            windowMap[viewModel] = window;
            return(new DefaultDialogService(window));
        }
Example #2
0
        public IDialogService GetDialogService <TViewModel>(TViewModel viewModel)
        {
            var view   = locator.GetView(typeof(TViewModel));
            var window = windowProvider.Create(view, viewModel);

            window.Closed += Window_Closed;

            windowMap[viewModel] = window;
            return(new DefaultDialogService(window));

            void Window_Closed(object sender, EventArgs e)
            {
                windowMap.Remove(viewModel);
            }
        }