更新 Pagination.cs 中 CurrentPage 属性注册
修改 CurrentPage 属性的注册方式,新增 defaultBindingMode 参数以支持双向绑定。其他常量定义保持不变。
This commit is contained in:
@@ -28,7 +28,7 @@ public class Pagination : TemplatedControl
|
|||||||
public const string PART_QuickJumpInput = "PART_QuickJumpInput";
|
public const string PART_QuickJumpInput = "PART_QuickJumpInput";
|
||||||
|
|
||||||
public static readonly StyledProperty<int?> CurrentPageProperty = AvaloniaProperty.Register<Pagination, int?>(
|
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 =
|
public static readonly RoutedEvent<ValueChangedEventArgs<int>> CurrentPageChangedEvent =
|
||||||
RoutedEvent.Register<Pagination, ValueChangedEventArgs<int>>(nameof(CurrentPageChanged),
|
RoutedEvent.Register<Pagination, ValueChangedEventArgs<int>>(nameof(CurrentPageChanged),
|
||||||
|
|||||||
Reference in New Issue
Block a user