private static void RestoreDependencyProperties(Type ownerType) { List <PropertyEntry> properties; WeakType key = new WeakType(ownerType); if (_typeProperties.TryGetValue(key, out properties)) { foreach (PropertyEntry prop in properties) { Type propertyType = prop.Type; if (propertyType != null) { DependencyProperty.RegisterCommon(prop.Name, propertyType, ownerType, prop.Metadata.Create(), prop.Property); } } } }