public static void SetProperty(object instance, AttachableMemberIdentifier name, object value) { if (instance != null) { if (name == null) { throw new ArgumentNullException("name"); } IAttachedPropertyStore store = instance as IAttachedPropertyStore; if (store != null) { store.SetProperty(name, value); } else { attachedProperties.SetProperty(instance, name, value); } } }
public static void SetProperty(object instance, AttachableMemberIdentifier name, object value) { if (instance == null) { return; } if (name == null) { throw new ArgumentNullException(nameof(name)); } IAttachedPropertyStore ap = instance as IAttachedPropertyStore; if (ap != null) { ap.SetProperty(name, value); return; } attachedProperties.SetProperty(instance, name, value); }
public static void SetSound(IAttachedPropertyStore element, int value) { element.SetProperty(SoundProperty, value); }
public static void SetVersion(IAttachedPropertyStore element, decimal value) { element.SetProperty(VersionProperty, value); }