/// <inheritdoc />
        public async Task <bool> OpenWindowAsync(IWindowViewModel viewModel, string windowId)
        {
            var coordinator = CoordinatorFactory.Create(viewModel);

            Log.Debug($"Opening window {viewModel.GetType().FullName}");
            return(await coordinator.DisplayAsync(viewModel, new WindowArguments(windowId ?? Guid.NewGuid().ToString())));
        }
        private Window CreateWindow(IWindowViewModel windowViewModel)
        {
            var window = (Window)Activator.CreateInstance(m_viewMapping[windowViewModel.GetType()]);

            window.DataContext = windowViewModel;
            window.Loaded     += (sender, args) => windowViewModel.OnViewIsLoaded();
            window.Closed     += (sender, args) => windowViewModel.OnViewIsClosed();

            return(window);
        }