From 92daa089192a8cacee8dd2a417b9a149335952a4 Mon Sep 17 00:00:00 2001 From: polarboy Date: Tue, 8 Oct 2024 14:05:35 +0800 Subject: [PATCH] fixed When the collapse index changes, the style update will not be triggered https://gitee.com/chinware/atomui/issues/IAUM0S?from=project-issue --- src/AtomUI.Controls/Collapse/Collapse.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/AtomUI.Controls/Collapse/Collapse.cs b/src/AtomUI.Controls/Collapse/Collapse.cs index c2d61a5..3150c5b 100644 --- a/src/AtomUI.Controls/Collapse/Collapse.cs +++ b/src/AtomUI.Controls/Collapse/Collapse.cs @@ -178,6 +178,14 @@ public class Collapse : SelectingItemsControl SetupCollapseBorderThickness(collapseItem, index); } } + + protected override void ContainerIndexChangedOverride(Control container, int oldIndex, int newIndex) + { + if (container is CollapseItem collapseItem) + { + SetupCollapseBorderThickness(collapseItem, newIndex); + } + } private void SetupCollapseBorderThickness(CollapseItem collapseItem, int index) {