VirtualTreeView 0.4.1
See the version list below for details.
dotnet add package VirtualTreeView --version 0.4.1
NuGet\Install-Package VirtualTreeView -Version 0.4.1
<PackageReference Include="VirtualTreeView" Version="0.4.1" />
paket add VirtualTreeView --version 0.4.1
#r "nuget: VirtualTreeView, 0.4.1"
// Install VirtualTreeView as a Cake Addin #addin nuget:?package=VirtualTreeView&version=0.4.1 // Install VirtualTreeView as a Cake Tool #tool nuget:?package=VirtualTreeView&version=0.4.1
<table> <tr> <td rowspan=2> <img src="https://raw.githubusercontent.com/picrap/VirtualTreeView/master/Icon/VirtualTreeView.png" width=128 height=128 /></td> <td><h1>VirtualTreeView</h1></td> </tr> <tr><td>A WPF TreeView that actually supports virtualization.<br/> Works with .NET Framework 4.5.</td></tr> </table>
How to use it
It is available as a NuGet package.
The source code includes a demonstration application, where both modes (content and binding) are showed, side-by-side to traditional TreeView
control.
The treeview itself
It works exactly as the original TreeView
(with a lot of missing features...):
<vtv:VirtualTreeView ItemsSource="{Binding Items}">
<vtv:VirtualTreeView.Resources>
<HierarchicalDataTemplate ItemsSource="{Binding Children}"
DataType="{x:Type my:ViewModels}">
<Grid>
<TextBlock Text="{Binding MyLabel}"/>
</Grid>
</HierarchicalDataTemplate>
</vtv:VirtualTreeView.Resources>
<vtv:VirtualTreeView.ItemContainerStyle>
<Style TargetType="{x:Type vtv:VirtualTreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding MyIsExpanded, Mode=TwoWay}" />
</Style>
</vtv:VirtualTreeView.ItemContainerStyle>
</vtv:VirtualTreeView>
The treeview item
If you move from an existing treeView, you'll need to copy/paste your TreeViewItem
style and adapt it to vtv:TreeViewItem
(usually no change is required, except removing the hierarchical part, which is generated when the control converts the tree to a list).
What does work
Currently it has only the features I needed (which is showing items and let them live); all contributors are welcome. The goal is to have a complete and extensible tree view.
- With binding,
INotifyCollectionChanged
fully works, so you can dynamically change content by adding or removing elements at any point of the hierarchy.
What does not
- With binding,
INotifyPropertyChanged
does not work at all, since the binding is partly simulated (because the view items are not generated).
How to contribute
Fork it, update it, and submit your pull requests.
Alternatively you can submit requests.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- No dependencies.
-
net6.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.4.2 | 196 | 7/26/2024 |
0.4.1 | 682 | 2/14/2022 |
0.4.0 | 1,441 | 5/2/2017 |
0.3.3 | 1,233 | 11/14/2016 |
0.3.2 | 1,211 | 11/14/2016 |
0.3.1 | 1,395 | 11/9/2016 |
0.3.0 | 1,517 | 11/5/2016 |
0.2.7 | 1,191 | 10/31/2016 |
0.2.3 | 1,224 | 10/28/2016 |
0.2.2 | 1,205 | 10/28/2016 |
0.2.1 | 1,247 | 10/27/2016 |
0.2.0 | 1,161 | 10/27/2016 |
0.1.0 | 1,201 | 10/26/2016 |