Geschafft!

This commit is contained in:
Holger Boerchers 2018-08-14 23:29:51 +02:00
parent 2b295c9d93
commit 7227d3215a
2 changed files with 11 additions and 5 deletions

View File

@ -1,9 +1,8 @@
using System.Collections.Generic; using System.Windows;
using System.Windows; using DryIoc;
using MaterialModernWPF.Module; using MaterialModernWPF.Module;
using MaterialModernWPF.Service; using MaterialModernWPF.Service;
using MaterialModernWPF.View; using MaterialModernWPF.View;
using Prism.DryIoc;
using Prism.Ioc; using Prism.Ioc;
using Prism.Modularity; using Prism.Modularity;
@ -12,8 +11,15 @@ namespace MaterialModernWPF
/// <summary> /// <summary>
/// Interaktionslogik für "App.xaml" /// Interaktionslogik für "App.xaml"
/// </summary> /// </summary>
public partial class App : PrismApplication public partial class App
{ {
protected override Rules CreateContainerRules()
{
return Rules.Default.WithAutoConcreteTypeResolution()
.With(Made.Of(FactoryMethod.ConstructorWithResolvableArguments))
.WithDefaultIfAlreadyRegistered(IfAlreadyRegistered.AppendNotKeyed);
}
protected override void RegisterTypes(IContainerRegistry containerRegistry) protected override void RegisterTypes(IContainerRegistry containerRegistry)
{ {
containerRegistry.Register<ShellViewModel>(); containerRegistry.Register<ShellViewModel>();

View File

@ -23,7 +23,7 @@ namespace MaterialModernWPF.Service
private void SelectionChanged((CalculationPackage sender, bool isSelected) payload) private void SelectionChanged((CalculationPackage sender, bool isSelected) payload)
{ {
var viewKey = payload.sender.CalculationViewType.FullName; var viewKey = payload.sender.GetType().FullName;
var region = _regionManager.Regions[Constants.PackagesRegion]; var region = _regionManager.Regions[Constants.PackagesRegion];
if (payload.isSelected) if (payload.isSelected)
{ {