public PriorityValue( IAvaloniaObject owner, StyledPropertyBase <T> property, IValueSink sink, IPriorityValueEntry <T> existing) : this(owner, property, sink) { existing.Reparent(this); _entries.Add(existing); if (existing is IBindingEntry binding && existing.Priority == BindingPriority.LocalValue) { // Bit of a special case here: if we have a local value binding that is being // promoted to a priority value we need to make sure the binding is subscribed // even if we've got a batch operation in progress because otherwise we don't know // whether the binding or a subsequent SetValue with local priority will win. A // notification won't be sent during batch update anyway because it will be // caught and stored for later by the ValueStore. binding.Start(ignoreBatchUpdate: true); } var v = existing.GetValue(); if (v.HasValue) { _value = v; Priority = existing.Priority; } }
void IValueSink.Completed <T>( StyledPropertyBase <T> property, IPriorityValueEntry entry, Optional <T> oldValue) { ((IValueSink)this).ValueChanged(property, BindingPriority.Unset, oldValue, default); }
void IValueSink.Completed <TValue>( StyledPropertyBase <TValue> property, IPriorityValueEntry entry, Optional <TValue> oldValue) { _entries.Remove((IPriorityValueEntry <T>)entry); UpdateEffectiveValue(); }
public void Completed(StyledPropertyBase <T> property, IPriorityValueEntry entry, Optional <T> oldValue) { if (_store is not null) { _store?.Completed(property, entry, oldValue); } else { _priorityValue !.Completed(entry, oldValue); } }
public PriorityValue( IAvaloniaObject owner, StyledPropertyBase <T> property, IValueSink sink, IPriorityValueEntry <T> existing) : this(owner, property, sink) { existing.Reparent(this); _entries.Add(existing); if (existing.Value.HasValue) { Value = existing.Value; ValuePriority = existing.Priority; } }
void IValueSink.Completed(AvaloniaProperty property, IPriorityValueEntry entry) { }
void IValueSink.Completed(AvaloniaProperty property, IPriorityValueEntry entry) { _entries.Remove((IPriorityValueEntry <T>)entry); UpdateEffectiveValue(); }
public void Completed <T>(StyledPropertyBase <T> property, IPriorityValueEntry entry, Optional <T> oldValue) { }