From 5c511603b63af557d25866259d94fb6743c65c9c Mon Sep 17 00:00:00 2001 From: Antony Male Date: Fri, 12 Jun 2015 19:47:28 +0100 Subject: [PATCH] Fix 'Eliminate ViewManager' --- Stylet/Xaml/View.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stylet/Xaml/View.cs b/Stylet/Xaml/View.cs index dfd0ec0..d93e376 100644 --- a/Stylet/Xaml/View.cs +++ b/Stylet/Xaml/View.cs @@ -77,7 +77,7 @@ namespace Stylet.Xaml public static readonly DependencyProperty ModelProperty = DependencyProperty.RegisterAttached("Model", typeof(object), typeof(View), new PropertyMetadata(defaultModelValue, (d, e) => { - var viewManager = ((FrameworkElement)d).Resources[ViewManagerResourceKey] as IViewManager; + var viewManager = ((FrameworkElement)d).TryFindResource(ViewManagerResourceKey) as IViewManager; if (viewManager == null) {