From 3b877b5501c3c0e4ccb7e4cfd37ddae60f670e4f Mon Sep 17 00:00:00 2001
From: chenghaoran <chenghaoran@ipilotwhale.com>
Date: 星期三, 21 二月 2024 22:36:24 +0800
Subject: [PATCH] 完善基础组件;
---
Utils/CanvasHelper.cs | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Utils/CanvasHelper.cs b/Utils/CanvasHelper.cs
index 63bf333..6950430 100644
--- a/Utils/CanvasHelper.cs
+++ b/Utils/CanvasHelper.cs
@@ -2,25 +2,26 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
+using WPFProject.Controls;
namespace WPFProject.Utils
{
public class CanvasHelper
{
- public static void SetTopZIndex(object element, DependencyObject parent, Type targetClass)
+ public static void SetTopZIndex(InnerWindow element, DependencyObject parent, Type targetClass)
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
{
- UIElement child = VisualTreeHelper.GetChild(parent, i) as UIElement;
+ InnerWindow child = VisualTreeHelper.GetChild(parent, i) as InnerWindow;
if (child != null && targetClass == child.GetType())
{
if (element == child)
{
- Canvas.SetZIndex(child, 1);
+ child.Zindex = 1;
}
else
{
- Canvas.SetZIndex(child, 0);
+ child.Zindex = 0;
}
}
--
Gitblit v1.9.1