public void SetProperty(AttachedPropertyID propertyID, object value) { var dictionary = _data.Value; lock (dictionary) { dictionary[propertyID] = value; } }
public bool RemoveProperty(AttachedPropertyID propertyID) { if (_data.IsValueCreated) { var dictionary = _data.Value; lock (dictionary) { return(dictionary.Remove(propertyID)); } } return(false); }
public bool TryGetProperty(AttachedPropertyID propertyID, out object value) { if (_data.IsValueCreated) { var dictionary = _data.Value; lock (dictionary) { object answer; if (dictionary.TryGetValue(propertyID, out answer)) { value = answer; return(true); } } } value = null; return(false); }
public static string GetExtenderName(AttachedPropertyID name) { return(string.Concat(name.DeclaringType.Name, ".", name.PropertyName)); }
public abstract bool TryGetProperty(AttachedPropertyID propertyID, out object value);
public abstract void SetProperty(AttachedPropertyID propertyID, object value);
public abstract bool RemoveProperty(AttachedPropertyID propertyID);