Skip to content

Replace TreeView with TreeDataGrid - #100

Merged
hendrikmennen merged 14 commits into
mainfrom
feature/#99-tree-view-performance
Sep 15, 2025
Merged

Replace TreeView with TreeDataGrid#100
hendrikmennen merged 14 commits into
mainfrom
feature/#99-tree-view-performance

Conversation

@Schanze97

@Schanze97 Schanze97 commented Sep 11, 2025

Copy link
Copy Markdown
Collaborator

Replaced the TreeView with the TreeDatagrid for the ProjectExplorer and LibraryExplorer

This involves the following changes

  • added custom theme
  • SelectedElements are only bindable as IReadOnlyList. Therefore a new function for selecting nodes has been added. This function computes the IndexPath of the item, and selects it from that
  • IsExpandable is not bindable. If it is binded in the style, a measuring exception will occur. It is bound manually the following way:
    • to source -> bound ToggleButton in ControlTemplate to set the property in the ViewModel
    • to view -> added attached Property to sync the view with the Vm

Fixes:

  • when searching for an element the default behavior was, that the TreeView collapsed and expanded to the found elements. collapsing and expanding causes the lazy loading (LoadingDummyNode -> ProjectExplorerNode) to execute. After that, the found elements in the search result is no longer the valid object reference in the view. The function has been changed, that only loaded nodes are taken to account for the search.

@Schanze97
Schanze97 marked this pull request as ready for review September 15, 2025 07:53
@hendrikmennen
hendrikmennen merged commit ae71f8b into main Sep 15, 2025
1 check passed
@hendrikmennen
hendrikmennen deleted the feature/#99-tree-view-performance branch September 15, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants