在网上找的一个模板,放在这里,作为笔记,收集
<ListView Grid.Column="" Grid.Row="" Name="ListmuLu" >
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<WrapPanel>
<Label Content="驾驶员姓名:"/>
<TextBox Text="{Binding Path=Pilot}" Height="" Width=""/>
</WrapPanel>
<WrapPanel>
<Label Content="识别车牌:"/>
<TextBlock Text="{Binding Path=CarNO1}"/>
</WrapPanel>
<WrapPanel>
<Label Content="正确车牌:"/>
<TextBlock Text="{Binding Path=CarNO2}"/>
</WrapPanel>
<WrapPanel>
<Label Content="违章日期:"/>
<TextBlock Text="{Binding Path=Date}"/>
</WrapPanel>
<WrapPanel>
<Label Content="违章路段:"/>
<TextBlock Text="{Binding Path=Sections}"/>
</WrapPanel>
<WrapPanel>
<Label Content="违章类型:"/>
<TextBlock Text="{Binding Path=Type}"/>
</WrapPanel>
<WrapPanel>
<Label Content="违章等级:"/>
<TextBlock Text="{Binding Path=Level}"/>
</WrapPanel>
<WrapPanel>
<Label Content="违章车型:"/>
<TextBlock Text="{Binding Path=Models}"/>
</WrapPanel>
<WrapPanel>
<Label Content="车辆所属单位:"/>
<TextBlock Text="{Binding Path=Units}"/>
</WrapPanel>
<WrapPanel>
<Label Content="所扣分数:"/>
<TextBlock Text="{Binding Path=Score}"/>
</WrapPanel>
<WrapPanel>
<Label Content="有效状态:"/>
<TextBox Text="{Binding Path=Status}" Height="" Width=""/>
<ComboBox Height="" Width="" SelectedValue="{Binding Path=Status, Mode=OneWay}">
<ComboBoxItem Content="有效"/>
<ComboBoxItem Content="无效"/>
</ComboBox>
</WrapPanel>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>