From 8ca0eb53e456a1f9f8dd41d9e1c1e32fe5f17522 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Mon, 24 May 2021 22:06:58 +0800 Subject: [PATCH] fixed #824 --- src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs b/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs index 5c4c6f8b..b418a0f2 100644 --- a/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs +++ b/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs @@ -89,7 +89,7 @@ namespace HandyControl.Controls /// 最大页数 /// public static readonly DependencyProperty MaxPageCountProperty = DependencyProperty.Register( - "MaxPageCount", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnMaxPageCountChanged, CoerceMaxPageCount), ValidateHelper.IsInRangeOfPosInt); + "MaxPageCount", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnMaxPageCountChanged, CoerceMaxPageCount), ValidateHelper.IsInRangeOfPosIntIncludeZero); private static object CoerceMaxPageCount(DependencyObject d, object basevalue) { @@ -157,7 +157,7 @@ namespace HandyControl.Controls /// 当前页 /// public static readonly DependencyProperty PageIndexProperty = DependencyProperty.Register( - "PageIndex", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnPageIndexChanged, CoercePageIndex), ValidateHelper.IsInRangeOfPosInt); + "PageIndex", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnPageIndexChanged, CoercePageIndex), ValidateHelper.IsInRangeOfPosIntIncludeZero); private static object CoercePageIndex(DependencyObject d, object basevalue) {