| | |
| | | |
| | | 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() |
| | |
| | | { |
| | | 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; |
| | | } |