Permalink
Browse files

Demonstrate workaround - selector instantiates the RD

  • Loading branch information...
1 parent a544f1d commit 6e25d97a99f735e06d4f567ff468108ce5858f41 @druttka committed Jun 30, 2016
Showing with 1 addition and 2 deletions.
  1. +0 −1 DataTemplates/App.xaml
  2. +1 −1 DataTemplates/ThingTemplateSelector.cs
@@ -8,7 +8,6 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
- <local:ThingTemplates></local:ThingTemplates>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
@@ -10,7 +10,7 @@ public class ThingTemplateSelector : DataTemplateSelector
private readonly Dictionary<Type, DataTemplate> TemplatesByType;
private readonly ResourceDictionary Resources;
- public ThingTemplateSelector() : this(Application.Current.Resources)
+ public ThingTemplateSelector() : this(new ThingTemplates())
{
}

0 comments on commit 6e25d97

Please sign in to comment.