wenxiangchao
2026-11-02 9d1660270272180cd71147d6ddd53d1382643d2e
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;
            }