I'm not a tree view expert, but it's easy to build something like that without a tree view.
Start with an empty VS2008 Wpf Application named WpfTreeGridWhatever
First, let's define our model:
using System;
using System.Collections.Generic;
namespace WpfTreeGridWhatever
{
public class ItemBase
{
}
public class Group : ItemBase
{
public string Name { get; set; }
public IList<ItemBase> Items { get; set; }
}
public class Item : ItemBase
{
public string Name { get; set; }
public IList<Parameter> Parameters { get; set; }
}
public class Parameter
{
public string Name { get; set; }
public string Value { get; set; }
}
}
now, in the Window1 constructor create our objects (just so we have some data to bind to):
public Window1()
{
DataContext = new Group[]
{
new Group()
{
Name="Group A",
Items = new List<ItemBase>()
{
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"},
new Parameter(){Name="Param 3",Value="0.0"},
new Parameter(){Name="Param 4",Value="off"},
}
},
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"}
}
},
new Group()
{
Name="Group B",
Items = new List<ItemBase>()
{
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"},
new Parameter(){Name="Param 3",Value="0.0"},
new Parameter(){Name="Param 4",Value="off"},
}
},
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"},
new Parameter(){Name="Param 3",Value="0.0"},
new Parameter(){Name="Param 4",Value="off"},
new Parameter(){Name="Param 5",Value="2000"},
}
},
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"},
}
},
new Group()
{
Name="Group C",
Items = new List<ItemBase>()
{
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"},
new Parameter(){Name="Param 3",Value="0.0"},
new Parameter(){Name="Param 4",Value="off"},
}
},
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"},
new Parameter(){Name="Param 3",Value="0.0"},
new Parameter(){Name="Param 4",Value="off"},
new Parameter(){Name="Param 5",Value="2000"},
}
},
new Item()
{
Name="Item",
Parameters=new List<Parameter>()
{
new Parameter(){Name="Param 1",Value="12"},
new Parameter(){Name="Param 2",Value="true"},
}
},
}
}
}
}
}
}
};
InitializeComponent();
}
And now, the magic - use this code in Window1.xaml
<Window x:Class="WpfTreeGridWhatever.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:WpfTreeGridWhatever"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<LinearGradientBrush x:Key="Bk" StartPoint="0,0" EndPoint="0,1" >
<GradientStop Offset="0" Color="DarkGray"/>
<GradientStop Offset="1" Color="White"/>
</LinearGradientBrush>
<DataTemplate DataType="{x:Type l:Parameter}">
<Border CornerRadius="5" Background="{StaticResource Bk}"
BorderThickness="1" BorderBrush="Gray" Margin="2" >
<StackPanel Margin="5">
<TextBlock Height="12" Text="{Binding Name}"/>
<TextBox Height="22" Text="{Binding Value}"/>
</StackPanel>
</Border>
</DataTemplate>
<DataTemplate DataType="{x:Type l:Item}" >
<StackPanel>
<Border CornerRadius="5" Background="{StaticResource Bk}"
BorderThickness="1" BorderBrush="Gray" Height="25" Margin="3">
<TextBlock Height="12" Text="{Binding Name}" VerticalAlignment="Center" Margin="3,0"/>
</Border>
<ItemsControl ItemsSource="{Binding Parameters}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="{x:Type l:Group}">
<StackPanel>
<Border CornerRadius="5" Background="{StaticResource Bk}"
BorderThickness="1" BorderBrush="Gray" Height="25" Margin="3">
<TextBlock Height="12" Text="{Binding Name}" VerticalAlignment="Center" Margin="3,0"/>
</Border>
<ItemsControl ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
</DataTemplate>
</Window.Resources>
<Grid>
<ItemsControl ItemsSource="{Binding}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Grid>
</Window>
This should get you started