VirtualTreeView 0.4.2
dotnet add package VirtualTreeView --version 0.4.2
NuGet\Install-Package VirtualTreeView -Version 0.4.2
<PackageReference Include="VirtualTreeView" Version="0.4.2" />
paket add VirtualTreeView --version 0.4.2
#r "nuget: VirtualTreeView, 0.4.2"
// Install VirtualTreeView as a Cake Addin #addin nuget:?package=VirtualTreeView&version=0.4.2 // Install VirtualTreeView as a Cake Tool #tool nuget:?package=VirtualTreeView&version=0.4.2
VirtualTreeView
A virtualizing TreeView for .NET Framezork 4.6.2, .NET 6 and .NET 8
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. net8.0-windows7.0 is compatible. |
.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.
-
net8.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 | 199 | 7/26/2024 |
0.4.1 | 684 | 2/14/2022 |
0.4.0 | 1,445 | 5/2/2017 |
0.3.3 | 1,235 | 11/14/2016 |
0.3.2 | 1,212 | 11/14/2016 |
0.3.1 | 1,398 | 11/9/2016 |
0.3.0 | 1,518 | 11/5/2016 |
0.2.7 | 1,193 | 10/31/2016 |
0.2.3 | 1,226 | 10/28/2016 |
0.2.2 | 1,206 | 10/28/2016 |
0.2.1 | 1,249 | 10/27/2016 |
0.2.0 | 1,162 | 10/27/2016 |
0.1.0 | 1,204 | 10/26/2016 |