|
|
|
@ -355,6 +355,40 @@ namespace Avalonia |
|
|
|
SetDirectValueUnchecked(property, value); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Sets the value of a dependency property without changing its value source.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="property">The property.</param>
|
|
|
|
/// <param name="value">The value.</param>
|
|
|
|
/// <remarks>
|
|
|
|
/// This method is used by a component that programmatically sets the value of one of its
|
|
|
|
/// own properties without disabling an application's declared use of the property. The
|
|
|
|
/// method changes the effective value of the property, but existing data bindings and
|
|
|
|
/// styles will continue to work.
|
|
|
|
///
|
|
|
|
/// The new value will have the property's current <see cref="BindingPriority"/>, even if
|
|
|
|
/// that priority is <see cref="BindingPriority.Unset"/> or
|
|
|
|
/// <see cref="BindingPriority.Inherited"/>.
|
|
|
|
/// </remarks>
|
|
|
|
public void SetCurrentValue(AvaloniaProperty property, object? value) => |
|
|
|
property.RouteSetCurrentValue(this, value); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Sets the value of a dependency property without changing its value source.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="T">The type of the property.</typeparam>
|
|
|
|
/// <param name="property">The property.</param>
|
|
|
|
/// <param name="value">The value.</param>
|
|
|
|
/// <remarks>
|
|
|
|
/// This method is used by a component that programmatically sets the value of one of its
|
|
|
|
/// own properties without disabling an application's declared use of the property. The
|
|
|
|
/// method changes the effective value of the property, but existing data bindings and
|
|
|
|
/// styles will continue to work.
|
|
|
|
///
|
|
|
|
/// The new value will have the property's current <see cref="BindingPriority"/>, even if
|
|
|
|
/// that priority is <see cref="BindingPriority.Unset"/> or
|
|
|
|
/// <see cref="BindingPriority.Inherited"/>.
|
|
|
|
/// </remarks>
|
|
|
|
public void SetCurrentValue<T>(StyledProperty<T> property, T value) |
|
|
|
{ |
|
|
|
_ = property ?? throw new ArgumentNullException(nameof(property)); |
|
|
|
|