Browse Source
feat: add UpdateSourceTrigger support for ReflectionBindingExtension (#16861)
pull/17021/head
Dong Bin
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
1 deletions
-
src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/ReflectionBindingExtension.cs
|
|
|
@ -38,7 +38,8 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions |
|
|
|
RelativeSource = RelativeSource, |
|
|
|
DefaultAnchor = new WeakReference(serviceProvider.GetDefaultAnchor()), |
|
|
|
TargetNullValue = TargetNullValue, |
|
|
|
NameScope = new WeakReference<INameScope?>(serviceProvider.GetService<INameScope>()) |
|
|
|
NameScope = new WeakReference<INameScope?>(serviceProvider.GetService<INameScope>()), |
|
|
|
UpdateSourceTrigger = UpdateSourceTrigger, |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
@ -67,5 +68,11 @@ namespace Avalonia.Markup.Xaml.MarkupExtensions |
|
|
|
public RelativeSource? RelativeSource { get; set; } |
|
|
|
|
|
|
|
public object? TargetNullValue { get; set; } = AvaloniaProperty.UnsetValue; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value that determines the timing of binding source updates for
|
|
|
|
/// <see cref="BindingMode.TwoWay"/> and <see cref="BindingMode.OneWayToSource"/> bindings.
|
|
|
|
/// </summary>
|
|
|
|
public UpdateSourceTrigger UpdateSourceTrigger { get; set; } |
|
|
|
} |
|
|
|
} |
|
|
|
|