这是使用第3方的gridView控件 下载地址
xml文件:
View Code
1 <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
2 <GridView4WP7:GridView x:Name="gvInfo" Margin="0,-22,-12,0" Width="660">
3 <GridView4WP7:GridView.Columns>
4 <GridView4WP7:GridViewTextColumn Header="人员编号" Binding="{Binding RYID}" Width="90" />
5 <GridView4WP7:GridViewTextColumn Header="人员姓名" Binding="{Binding Name}" Width="90" />
6 <GridView4WP7:GridViewTextColumn Header="部门名称" Binding="{Binding DepartmentName}" Width="100"/>
7 <GridView4WP7:GridViewTextColumn Header="地点编号" Binding="{Binding CurrentStation}" Width="90" />
8 <GridView4WP7:GridViewTextColumn Header="所在位置" Binding="{Binding CurAddress}" Width="170"/>
9 <GridView4WP7:GridViewTextColumn Header="工作时长" Binding="{Binding time}" Width="120" />
10 </GridView4WP7:GridView.Columns>
11 </GridView4WP7:GridView>
12 </Grid>
.cs文件
//list代表数据源 this.gvInfo.ItemsSource = list;