Example #1
0
 public static DesigntimePropertyCollection GetProperties(DependencyObject obj)
 {
     if (obj == null)
     {
         throw new ArgumentNullException(nameof(obj));
     }
     if (obj.GetValue(PropertiesProperty) is DesigntimePropertyCollection col)
     {
         return(col);
     }
     col = new DesigntimePropertyCollection(obj);
     SetProperties(obj, col);
     return(col);
 }
Example #2
0
 private static void SetProperties(DependencyObject obj, DesigntimePropertyCollection value)
 {
     obj.SetValue(PropertiesPropertyKey, value);
 }