From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点

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

diff --git a/HMI.UI/DpUtil/CanvasHelper.cs b/HMI.UI/DpUtil/CanvasHelper.cs
new file mode 100644
index 0000000..8973ac7
--- /dev/null
+++ b/HMI.UI/DpUtil/CanvasHelper.cs
@@ -0,0 +1,42 @@
+锘縰sing HMI.UI.MDI;
+using System;
+using System.Windows;
+using System.Windows.Media;
+
+namespace HMI.UI.DpUtil
+{
+    public class CanvasPosition
+    {
+        public double Top { get; set; }
+        public double Left { get; set; }
+        public double Width { get; set; }
+        public double Height { get; set; }
+
+        public double LimitWidth { get; set; }
+        public double LimitHeight { get; set; }
+    }
+
+    public class CanvasHelper
+    {
+        public static void SetTopZIndex(InnerWindow element, DependencyObject parent, Type targetClass)
+        {
+            int max = 0;
+            int zindex = element.Zindex;
+
+            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
+            {
+                InnerWindow child = VisualTreeHelper.GetChild(parent, i) as InnerWindow;
+                if (child != null && targetClass == child.GetType())
+                {
+                    if (element != child && child.Zindex >= zindex)
+                    {
+                        child.Zindex = child.Zindex-1;
+                    }
+                   
+                }
+                max++;
+            }
+            element.Zindex = max;
+        }
+    }
+}

--
Gitblit v1.9.1