Anyone know where I can get a control like the Multi-column Tree-View in WPF?
SharpDevelop has ListView
subclass called SharpTreeView
which does what you are looking for.
You can see a live example of this control in SharpDevelop's "Watch" window:
XAML used in the Watch window (as in 5.1.0 beta):
<tv:SharpGridView x:Key="variableGridView" AllowsColumnReorder="False">
<GridView.Columns>
<GridViewColumn Header="{core:Localize MainWindow.Windows.Debug.LocalVariables.NameColumn}" Width="200">
<GridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<tv:SharpTreeNodeView />
<local:AutoCompleteTextBox x:Name="name" Margin="-6 0 0 0" MinWidth="100" Text="{Binding Node.Name}" IsEditable="{Binding Node.CanSetName}">
<local:AutoCompleteTextBox.ContextMenu>
<MultiBinding Converter="{StaticResource menuBuilder}">
<Binding Path="Node.ContextMenuAddInTreeEntry" />
<Binding Path="Node" />
</MultiBinding>
</local:AutoCompleteTextBox.ContextMenu>
</local:AutoCompleteTextBox>
</StackPanel>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{core:Localize MainWindow.Windows.Debug.LocalVariables.ValueColumn}" Width="200">
<GridViewColumn.CellTemplate>
<DataTemplate>
<local:AutoCompleteTextBox
MinWidth="100"
Text="{Binding Node.Value}"
IsEditable="{Binding Node.CanSetValue}">
<local:AutoCompleteTextBox.ContextMenu>
<MultiBinding Converter="{StaticResource menuBuilder}">
<Binding Path="Node.ContextMenuAddInTreeEntry" />
<Binding Path="Node" />
</MultiBinding>
</local:AutoCompleteTextBox.ContextMenu>
</local:AutoCompleteTextBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{core:Localize MainWindow.Windows.Debug.LocalVariables.TypeColumn}" Width="200">
<GridViewColumn.CellTemplate>
<DataTemplate>
<local:AutoCompleteTextBox MinWidth="100" Text="{Binding Node.Type}" IsEditable="False">
<local:AutoCompleteTextBox.ContextMenu>
<MultiBinding Converter="{StaticResource menuBuilder}">
<Binding Path="Node.ContextMenuAddInTreeEntry" />
<Binding Path="Node" />
</MultiBinding>
</local:AutoCompleteTextBox.ContextMenu>
</local:AutoCompleteTextBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView.Columns>
</tv:SharpGridView>
The resource is set to the View property of a SharpTreeView control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With