ViewManager should be singleton

Fixes #71
This commit is contained in:
Antony Male 2019-09-24 14:54:19 +01:00
parent d6c2f8e7df
commit 5c2e921a50
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ namespace Stylet
builder.Bind<ViewManagerConfig>().ToInstance(viewManagerConfig).AsWeakBinding();
// Bind it to both IViewManager and to itself, so that people can get it with Container.Get<ViewManager>()
builder.Bind<IViewManager>().And<ViewManager>().To<ViewManager>().AsWeakBinding();
builder.Bind<IViewManager>().And<ViewManager>().To<ViewManager>().InSingletonScope().AsWeakBinding();
builder.Bind<IWindowManagerConfig>().ToInstance(this).DisposeWithContainer(false).AsWeakBinding();
builder.Bind<IWindowManager>().To<WindowManager>().InSingletonScope().AsWeakBinding();