下载此文档

WPF第十章排序筛选.doc


文档分类:行业资料 | 页数:约9页 举报非法文档有奖
1/9
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/9 下载此文档
文档列表 文档介绍
我们使用CollectionView实现了对于绑定数据的导航,除导航功能外,还可以通过CollectionView对数据进行类似于DataView的排序、筛选等功能。一、数据的排序:使用第二十四节的数据源,查询所有的产品信息:1:<Windowx:Class=""2:xmlns="http://schemas./winfx/2006/xaml/presentation"3:xmlns:x="http://schemas./winfx/2006/xaml"4:xmlns:lib="clr-namespace:WPF_24_Library;assembly=WPF_24_Library"5:Title="CollectionViewSortData"Height="300"Width="500">6:<>7:<ObjectDataProviderx:Key="myDataSource"8:ObjectType="{x:Typelib:DataControl}"9:MethodName="GetAllProductInfo"/>10:</>11:<GridMargin="5">12:<>13:<RowDefinition/>14:<RowDefinitionHeight="50"/>15:</>16:<="0"17:DataContext="{StaticResourcemyDataSource}"18:ItemsSource="{Binding}">19:<>20:<DataTemplate>21:<WrapPanel>22:<TextBlockText="{BindingPath=ProductID}"Width="50"/>23:<TextBlockText="{BindingPath=ProductName}"Width="300"/>24:<TextBlockText="{BindingPath=UnitPrice}"Width="50"/>25:</WrapPanel>26:</DataTemplate>27:</>28:</ListBox>29:<="1"VerticalAlignment="Center"HorizontalAlignment="Center">30:<TextBlockText="第一排序:"VerticalAlignment="Center"/>31:<ComboBoxSelectedIndex="0"Width="80"x:Name="cmbColumnA">32:<>33:<ComboBoxItemTag="ProductID">产品编号</ComboBoxItem>34:<ComboBoxItemTag="ProductName">产品名称</ComboBoxItem>35:<ComboBoxItemTag="UnitPrice">产品单价</Comb

WPF第十章排序筛选 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数9
  • 收藏数0 收藏
  • 顶次数0
  • 上传人gxngqvk
  • 文件大小252 KB
  • 时间2020-09-18