From 771a0e7b6b1276087515bbe94de28358cb92963b Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 04 六月 2026 10:32:27 +0800
Subject: [PATCH] 优化老化;

---
 HMI.UI/DpUtil/UniformGridHelper.cs |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/HMI.UI/DpUtil/UniformGridHelper.cs b/HMI.UI/DpUtil/UniformGridHelper.cs
index 6f98327..1b12a2b 100644
--- a/HMI.UI/DpUtil/UniformGridHelper.cs
+++ b/HMI.UI/DpUtil/UniformGridHelper.cs
@@ -108,6 +108,24 @@
                     control.BorderThickness = bt;
                 }
 
+                if (child is Border border)
+                {
+
+                    int col = i % columnCount;
+                    int row = i / columnCount;
+
+                    double left = (col == 0 && ignoreLeft) ? 0 : width;
+                    double top = (row == 0 && ignoreTop) ? 0 : width;
+
+                    double right = ignoreRight ? 0 : ((col == columnCount - 1) ? width : 0);
+                    double bottom = ignoreBottom ? 0 : ((row == rowCount - 1) ? width : 0);
+
+                    var bt = new Thickness(left, top, right, bottom);
+
+                    border.BorderBrush = brush;
+                    border.BorderThickness = bt;
+                }
+
             }
         }
 

--
Gitblit v1.9.1