/// <summary> /// Setter for <see cref="VisualSetupsProperty"/> /// </summary> public static void SetVisualSetups(DependencyObject obj, DependencyObjectCollectionOfT <VisualSetupGroup> value) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } obj.SetValue(VisualSetupsProperty, value); }
/// <summary> /// Getter for <see cref="VisualSetupsProperty"/> /// </summary> public static DependencyObjectCollectionOfT <VisualSetupGroup> GetVisualSetups(DependencyObject obj) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } var collection = (DependencyObjectCollectionOfT <VisualSetupGroup>)obj.GetValue(VisualSetupsProperty); // If the collection wasn't yet set if (collection == null) { // Create a new instance collection = new DependencyObjectCollectionOfT <VisualSetupGroup>(); // And set it for the object obj.SetValue(VisualSetupsProperty, collection); } return(collection); }
/// <summary> /// Default Constructor /// </summary> protected VisualSetupBase() { Setters = new DependencyObjectCollectionOfT <IVisualSetter>(); TemporarySetters = new DependencyObjectCollectionOfT <ITemporaryVisualSetter>(); }