WPF ListBox的DataTemplate例子
<ListBox Name="lbLogInfo">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Grid.RowSpan="" MinWidth="" Text="{Binding Path=State,
Converter={StaticResource DisplayConverter}}"/>
<TextBlock Grid.Column="" Text="{Binding Path=FileName}"/>
<TextBlock Grid.Row="" Grid.Column="" Margin="0,2" Text="{Binding Path=ModifiedDate}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
WPF ListBox的DataTemplate例子的更多相关文章
- 【WPF】ListBox使用DataTemplate 以及默认选中第一项Item
ListBox中DataTemplate的用法如下 . <ListBox x:Name="areaLB" ItemsSource="{Binding AreaNum ...
- Wpf ListBox数据绑定实例1--绑定字典集合
1.使用ListBox绑定Dictionary字典数据 ListBox常用事件SelectionChanged private void bindListBox() { Dictionary<s ...
- WPF ListBox数据绑定
本文来源 http://wshoufeng1989.blog.163.com/blog/static/202047033201282911633670/ 风随影动的博客 使用数据库AllData , ...
- WPF : ListBox的几种Template属性
原文:WPF : ListBox的几种Template属性 属性名 属性的类名 功能 示例 Template ControlTemplate 定义控件自身的外观.其子元素的布局可以自定义,也可以由It ...
- 自定义WPF ListBox的选中项样式
首先介绍一种简单地方法:就是通过自定义SystemColors类的参数来自定义WPF ListBox选择颜色的,SystemColors的HighlightBrushKey和HighlightText ...
- wpf ListBox或ListView等数据控件 绑定数据,最简单的方式
在网上很难找最简单的案例,都是一大片,看着都头疼: 试试举一反三,如果把结果赋给DataContext这个属性,那就前台需要绑定ItemsSource="{Binding}",请注 ...
- WPF listbox实现多列显示数据
一.每行显示固定列数 <ListBox ItemsSource="{Binding DataList}" Style="{DynamicResource ListB ...
- WPF 动态创建 DataTemplate 及数据绑定
WPF 动态创建 DataTemplate 及数据绑定 运行环境:Window7 64bit,.NetFramework4.61,C# 6.0: 编者:乌龙哈里 2017-02-22 参考: star ...
- 自定义WPF ListBox的选择样式
(下图:进行多项选择的ListBox) 首先介绍一种简单地方法:就是通过自定义SystemColors类的参数来自定义WPF ListBox选择颜色的,SystemColors的HighlightBr ...
随机推荐
- Python 字典排序
思路是把字典转为列表后再排序 d={'z':1,'y':2,'x':3} # 字典 s=d.items() # [('y', 2), ('x', 3), ('z', 1)] 列表 s.sort() # ...
- [转]HTML accesskey 属性
本文转自:http://www.dreamdu.com/xhtml/attribute_accesskey/ 17.2. HTML accesskey 属性 accesskey 属性 -- 代表链 ...
- hdu3584 树状数组
思路:从一维扩展到三维.可以看看poj2155的解法. #include<iostream> #include<cstring> #include<algorithm&g ...
- css3 盒模型记
css3 盒模型 css假定每个元素都会生成一个或多个矩形框,这称为元素框.各元素框中心有一个内容区.这个内容区周围有可选的内边距,边框和外边距.这些项之所以被认为是可选的,原因是它们的宽度可以设置为 ...
- Jersey(1.19.1) - Root Resource Classes
Root resource classes are POJOs (Plain Old Java Objects) that are annotated with @Path have at least ...
- NUI相关术语
分享一下微软资深企业架构师.应用开发专家余涛先生书中所谈到的相关术语,以便查阅,部分术语根据个人理解加入了细化内容: 1.波束形成算法(BeamformingAlgorithm) 基于现行阵列的阵列信 ...
- linux学习书籍推荐linux学习书籍推荐
引用地址:http://www.cnblogs.com/notepi/archive/2013/06/15/3137103.html Linux 学习书目推荐 Linux基础 1.<Linux与 ...
- Agile.Net 组件式开发平台 - 服务器端部署
应用服务器: 操作系统要求推荐Windows Server 2008,服务器硬件如果支持64位建议安装64位操作系统产品以最大化发挥服务器性能. 安装操作系统Windows Server 2008,其 ...
- C# Winform AutoScaleMode属性
属性的用法: None : 禁用自动缩放.(默认时) Font :根据类使用的字体(通常为系统字体)的维度控制缩放. Dpi : 根据显示分辨率控制缩放.常用分辨率为 96 和 120 DPI. In ...
- Oracle学习第二天---Profile的使用
环境:Oracle 11g 一.权限的传递 1.如果传递的是对象权限,就在后面加入with grant option: eg:system用户有张temp的表,只想usertest用户拥有查询的权限, ...