internal override void RouteSetValue( IAvaloniaObject o, object value, BindingPriority priority) { var v = TryConvert(value); if (v.HasValue) { o.SetValue <TValue>(this, (TValue)v.Value); } else if (v.Type == BindingValueType.UnsetValue) { o.ClearValue(this); } else if (v.HasError) { throw v.Error !; } }
/// <inheritdoc/> internal override IDisposable?RouteSetValue( IAvaloniaObject o, object?value, BindingPriority priority) { var v = TryConvert(value); if (v.HasValue) { return(o.SetValue <TValue>(this, (TValue)v.Value !, priority)); } else if (v.Type == BindingValueType.UnsetValue) { o.ClearValue(this); } else if (v.HasError) { throw v.Error !; } return(null); }
/// <inheritdoc/> internal override void RouteClearValue(IAvaloniaObject o) { o.ClearValue <TValue>(this); }