fix:分页按钮GroupName固定为1,同一界面存在两个分页按钮时,会导致按钮状态不对;
This commit is contained in:
1 parent
55d7d983e9
commit
ac67e75388
1 file changed
+7
-1
@@ -48,6 +48,8 @@ public class Pagination : Control
|
|||||||
|
|
||||||
private bool _appliedTemplate;
|
private bool _appliedTemplate;
|
||||||
|
|
||||||
|
private readonly string groupName = Guid.NewGuid().ToString("N");
|
||||||
|
|
||||||
#endregion Data
|
#endregion Data
|
||||||
|
|
||||||
#region Public Events
|
#region Public Events
|
||||||
@@ -284,6 +286,9 @@ public class Pagination : Control
|
|||||||
_buttonLast = GetTemplateChild(ElementButtonLast) as RadioButton;
|
_buttonLast = GetTemplateChild(ElementButtonLast) as RadioButton;
|
||||||
_jumpNumericUpDown = GetTemplateChild(ElementJump) as NumericUpDown;
|
_jumpNumericUpDown = GetTemplateChild(ElementJump) as NumericUpDown;
|
||||||
|
|
||||||
|
_buttonFirst.GroupName = groupName;
|
||||||
|
_buttonLast.GroupName = groupName;
|
||||||
|
|
||||||
CheckNull();
|
CheckNull();
|
||||||
|
|
||||||
_appliedTemplate = true;
|
_appliedTemplate = true;
|
||||||
@@ -395,7 +400,8 @@ public class Pagination : Control
|
|||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
Style = PaginationButtonStyle,
|
Style = PaginationButtonStyle,
|
||||||
Content = page.ToString()
|
Content = page.ToString(),
|
||||||
|
GroupName = groupName
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user