public DataTemplateResource(Resource resource)
     : base(resource.Key)
 {
     ResourceElement = resource.ResourceElement.Children.SingleOrDefault();
     foreach (KeyValuePair<string, string> property in resource.Properties)
     {
         Properties.Add(property.Key, property.Value);
     }
 }
 public StyleResource(Resource resource)
     : base(resource.Key)
 {
     ResourceElement = resource.ResourceElement;
     foreach (KeyValuePair<string, string> property in resource.Properties)
     {
         Properties.Add(property.Key, property.Value);
     }
 }