/// <summary> /// Initializes a new instance of the <see cref="PriorityLevel"/> class. /// </summary> /// <param name="owner">The owner.</param> /// <param name="priority">The priority.</param> public PriorityLevel( PriorityValue owner, int priority) { Contract.Requires<ArgumentNullException>(owner != null); _owner = owner; Priority = priority; Value = _directValue = AvaloniaProperty.UnsetValue; ActiveBindingIndex = -1; Bindings = new LinkedList<PriorityBindingEntry>(); }
/// <summary> /// Initializes a new instance of the <see cref="PriorityLevel"/> class. /// </summary> /// <param name="owner">The owner.</param> /// <param name="priority">The priority.</param> public PriorityLevel( PriorityValue owner, int priority) { Contract.Requires <ArgumentNullException>(owner != null); _owner = owner; Priority = priority; Value = _directValue = AvaloniaProperty.UnsetValue; ActiveBindingIndex = -1; Bindings = new LinkedList <PriorityBindingEntry>(); }
/// <summary> /// Creates a <see cref="PriorityValue"/> for a <see cref="AvaloniaProperty"/>. /// </summary> /// <param name="property">The property.</param> /// <returns>The <see cref="PriorityValue"/>.</returns> private PriorityValue CreatePriorityValue(AvaloniaProperty property) { var validate = ((IStyledPropertyAccessor)property).GetValidationFunc(GetType()); Func <object, object> validate2 = null; if (validate != null) { validate2 = v => validate(this, v); } PriorityValue result = new PriorityValue( this, property, property.PropertyType, validate2); return(result); }
/// <inheritdoc/> void IPriorityValueOwner.BindingNotificationReceived(PriorityValue sender, BindingNotification notification) { UpdateDataValidation(sender.Property, notification); }
/// <inheritdoc/> void IPriorityValueOwner.DataValidationChanged(PriorityValue sender, IValidationStatus status) { var property = sender.Property; DataValidationChanged(property, status); }