Exemple #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));
        }
Exemple #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);
            }
        }
 public static object GetView <TViewModel>(IViewInstanceLocator locator)
 {
     return(locator.GetView(typeof(TViewModel)));
 }