fix error in Pagination.cs

This commit is contained in:
jyl
2024-11-22 18:02:59 +08:00
parent 5db7793adc
commit 32c47d3ba7

View File

@@ -205,7 +205,7 @@ public class Pagination : TemplatedControl
{ {
base.OnApplyTemplate(e); base.OnApplyTemplate(e);
Button.ClickEvent.AddHandler(OnButtonClick, _previousButton, _nextButton); Button.ClickEvent.RemoveHandler(OnButtonClick, _previousButton, _nextButton);
_previousButton = e.NameScope.Find<PaginationButton>(PART_PreviousButton); _previousButton = e.NameScope.Find<PaginationButton>(PART_PreviousButton);
_nextButton = e.NameScope.Find<PaginationButton>(PART_NextButton); _nextButton = e.NameScope.Find<PaginationButton>(PART_NextButton);
_buttonPanel = e.NameScope.Find<StackPanel>(PART_ButtonPanel); _buttonPanel = e.NameScope.Find<StackPanel>(PART_ButtonPanel);