diff options
author | Bart Lannoeye <bart.lannoeye@gmail.com> | 2016-11-22 00:12:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-22 00:12:25 +0300 |
commit | 262a6b594fb52a12658aef61dd5f39c04c34bd7c (patch) | |
tree | 080e58b50550ac82f11a496097c30ac68339407a /docs | |
parent | f3742f4bff5dcbcf5150fd1fb7f284dddd0d0757 (diff) |
Fixing code sample
Diffstat (limited to 'docs')
-rw-r--r-- | docs/WPF/Appendix-D-Extending-Prism.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/WPF/Appendix-D-Extending-Prism.md b/docs/WPF/Appendix-D-Extending-Prism.md index 8addc58..bb6fffe 100644 --- a/docs/WPF/Appendix-D-Extending-Prism.md +++ b/docs/WPF/Appendix-D-Extending-Prism.md @@ -592,9 +592,9 @@ The following example shows how to configure the **ViewModelLocationProvider** t When bootstrapping your application use the **SetDefaultViewModelFactory** method to use your container to resolve view model types. The following is an example using Microsoft's Unity dependency injection container. - IUnityContainer \_container = new UnityContainer() + IUnityContainer _container = new UnityContainer(); ... - ViewModelLocationProvider.SetDefaultViewModelFactory((t)=> \_container.Resolve(t)); + ViewModelLocationProvider.SetDefaultViewModelFactory((t) => _container.Resolve(t)); The default strategy for creating the view models is using the **Activator.CreateInstance** method, which is a valid approach if you have a default constructor in the view model and there are no dependencies to be injected. |