Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://www.icsharpcode.net/OpenSource/SD/" rel="nofollow noreferrer">SharpDevelop</a> has <code>ListView</code> subclass called <a href="https://github.com/icsharpcode/ILSpy/blob/master/SharpTreeView/SharpTreeView.cs" rel="nofollow noreferrer"><code>SharpTreeView</code></a> which does what you are looking for.</p> <p>You can see a live example of this control in SharpDevelop's "Watch" window:</p> <p><img src="https://i.stack.imgur.com/A43d6.png" alt="SharpTreeView example"></p> <p>XAML used in the Watch window (as in 5.1.0 beta):</p> <pre><code>&lt;tv:SharpGridView x:Key="variableGridView" AllowsColumnReorder="False"&gt; &lt;GridView.Columns&gt; &lt;GridViewColumn Header="{core:Localize MainWindow.Windows.Debug.LocalVariables.NameColumn}" Width="200"&gt; &lt;GridViewColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel Orientation="Horizontal"&gt; &lt;tv:SharpTreeNodeView /&gt; &lt;local:AutoCompleteTextBox x:Name="name" Margin="-6 0 0 0" MinWidth="100" Text="{Binding Node.Name}" IsEditable="{Binding Node.CanSetName}"&gt; &lt;local:AutoCompleteTextBox.ContextMenu&gt; &lt;MultiBinding Converter="{StaticResource menuBuilder}"&gt; &lt;Binding Path="Node.ContextMenuAddInTreeEntry" /&gt; &lt;Binding Path="Node" /&gt; &lt;/MultiBinding&gt; &lt;/local:AutoCompleteTextBox.ContextMenu&gt; &lt;/local:AutoCompleteTextBox&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/GridViewColumn.CellTemplate&gt; &lt;/GridViewColumn&gt; &lt;GridViewColumn Header="{core:Localize MainWindow.Windows.Debug.LocalVariables.ValueColumn}" Width="200"&gt; &lt;GridViewColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;local:AutoCompleteTextBox MinWidth="100" Text="{Binding Node.Value}" IsEditable="{Binding Node.CanSetValue}"&gt; &lt;local:AutoCompleteTextBox.ContextMenu&gt; &lt;MultiBinding Converter="{StaticResource menuBuilder}"&gt; &lt;Binding Path="Node.ContextMenuAddInTreeEntry" /&gt; &lt;Binding Path="Node" /&gt; &lt;/MultiBinding&gt; &lt;/local:AutoCompleteTextBox.ContextMenu&gt; &lt;/local:AutoCompleteTextBox&gt; &lt;/DataTemplate&gt; &lt;/GridViewColumn.CellTemplate&gt; &lt;/GridViewColumn&gt; &lt;GridViewColumn Header="{core:Localize MainWindow.Windows.Debug.LocalVariables.TypeColumn}" Width="200"&gt; &lt;GridViewColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;local:AutoCompleteTextBox MinWidth="100" Text="{Binding Node.Type}" IsEditable="False"&gt; &lt;local:AutoCompleteTextBox.ContextMenu&gt; &lt;MultiBinding Converter="{StaticResource menuBuilder}"&gt; &lt;Binding Path="Node.ContextMenuAddInTreeEntry" /&gt; &lt;Binding Path="Node" /&gt; &lt;/MultiBinding&gt; &lt;/local:AutoCompleteTextBox.ContextMenu&gt; &lt;/local:AutoCompleteTextBox&gt; &lt;/DataTemplate&gt; &lt;/GridViewColumn.CellTemplate&gt; &lt;/GridViewColumn&gt; &lt;/GridView.Columns&gt; &lt;/tv:SharpGridView&gt; </code></pre> <p>The resource is set to the View property of a SharpTreeView control.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload