From fe2aa4880d5c9fd88088ad0ed81ebaca05629f5f Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 17:59:45 +0800
Subject: [PATCH] feat: 集成CAN驱动/模拟器 + 仪器仪表注册/硬件调试模块

---
 HMI.UI/Controls/treegrid/Controls/TreeDataGrid.cs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/HMI.UI/Controls/treegrid/Controls/TreeDataGrid.cs b/HMI.UI/Controls/treegrid/Controls/TreeDataGrid.cs
index 8823656..8dc00d4 100644
--- a/HMI.UI/Controls/treegrid/Controls/TreeDataGrid.cs
+++ b/HMI.UI/Controls/treegrid/Controls/TreeDataGrid.cs
@@ -19,10 +19,10 @@
 
         static TreeDataGrid()
         {
-            //ScrollViewer.HorizontalScrollBarVisibilityProperty
-            //    .OverrideMetadata(typeof(TreeDataGrid), new FrameworkPropertyMetadata(ScrollBarVisibility.Disabled));
-            //ScrollViewer.VerticalScrollBarVisibilityProperty
-            //    .OverrideMetadata(typeof(TreeDataGrid), new FrameworkPropertyMetadata(ScrollBarVisibility.Disabled));
+            ScrollViewer.HorizontalScrollBarVisibilityProperty
+                .OverrideMetadata(typeof(TreeDataGrid), new FrameworkPropertyMetadata(ScrollBarVisibility.Disabled));
+            ScrollViewer.VerticalScrollBarVisibilityProperty
+                .OverrideMetadata(typeof(TreeDataGrid), new FrameworkPropertyMetadata(ScrollBarVisibility.Disabled));
         }
 
         protected override DependencyObject GetContainerForItemOverride()
@@ -50,10 +50,10 @@
             {
                 oldTreeData.IsExpandedChange -= DataIsExpandedChange;
                 oldTreeData.VisibleChange -= DataVisiableChange;
-
             }
             if (DataContext != null && DataContext is TreeItemData treeData)
             {
+                Visibility = treeData.IsVisible ? Visibility.Visible : Visibility.Collapsed;
                 treeData.IsExpandedChange += DataIsExpandedChange;
                 treeData.VisibleChange += DataVisiableChange;
             }

--
Gitblit v1.9.1