Skip to content

Commit

Permalink
feat: add UpdateSourceTrigger support for ReflectionBindingExtension (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitism committed Sep 12, 2024
1 parent f47b733 commit 9e43170
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public Binding ProvideValue(IServiceProvider serviceProvider)
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,
};
}

Expand Down Expand Up @@ -67,5 +68,11 @@ public Binding ProvideValue(IServiceProvider serviceProvider)
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; }
}
}

0 comments on commit 9e43170

Please sign in to comment.