chr
2024-03-12 25dd2203bb3b995d73c43733b3aaa049ec28b4a9
Utils/CanvasHelper.cs
@@ -10,22 +10,23 @@
    {
        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)
                    if (element != child && child.Zindex >= zindex)
                    {
                        child.Zindex = 1;
                        child.Zindex = child.Zindex-1;
                    }
                    else
                    {
                        child.Zindex = 0;
                    }
                }
                max++;
            }
            element.Zindex = max;
        }
    }
}