更新 Pagination.cs 中 CurrentPage 属性注册

修改 CurrentPage 属性的注册方式,新增 defaultBindingMode 参数以支持双向绑定。其他常量定义保持不变。
This commit is contained in:
Soar360
2025-08-19 11:24:37 +08:00
parent 88318336a4
commit 37d359e73d

View File

@@ -28,7 +28,7 @@ public class Pagination : TemplatedControl
public const string PART_QuickJumpInput = "PART_QuickJumpInput";
public static readonly StyledProperty<int?> CurrentPageProperty = AvaloniaProperty.Register<Pagination, int?>(
nameof(CurrentPage), coerce: CoerceCurrentPage);
nameof(CurrentPage), coerce: CoerceCurrentPage, defaultBindingMode: Avalonia.Data.BindingMode.TwoWay);
public static readonly RoutedEvent<ValueChangedEventArgs<int>> CurrentPageChangedEvent =
RoutedEvent.Register<Pagination, ValueChangedEventArgs<int>>(nameof(CurrentPageChanged),