这是我想要做的一个模型:
https://www.dropbox.com/s/1nw78dqxuulvq73/Tree-01.png
这是迄今为止我在 XAML 中的代码(尽管我认为我没有正确解决问题):
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="CCListView.MainWindow"
x:Name="Window"
Title="MainWindow"
Width="640" Height="480">
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ListView Grid.Row="0" Grid.Column="0" ItemContainerStyle="{DynamicResource CustomListViewItemStyle}"
AlternationCount="2" Background="black" BorderThickness="0">
<ListView.View>
<GridView>
<GridViewColumn Header="Title" DisplayMemberBinding="{Binding Path=ContInfo}" />
</GridView>
</ListView.View>
<ListViewItem>
<ListViewItem.FontSize>15</ListViewItem.FontSize>
<ListViewItem.Foreground>black</ListViewItem.Foreground>
<ListViewItem.Content>test</ListViewItem.Content>
</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
</ListView>
<ListView Grid.Row="0" Grid.Column="1" ItemContainerStyle="{DynamicResource CustomListViewItemStyle}"
AlternationCount="2" Background="black" BorderThickness="0">
<ListView.View>
<GridView>
<GridViewColumn Header="Title" DisplayMemberBinding="{Binding Path=ContInfo}" />
</GridView>
</ListView.View>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
<ListViewItem>test</ListViewItem>
</ListView>
</Grid>
任何帮助将不胜感激!谢谢!维斯代