WPF SP1新功能—StringFormat
来源:互联网 发布:软件项目质量计划书 编辑:程序博客网 时间:2024/05/01 15:04
3.5SP1新功能之一是 stringformat. 这下面是一些示例代码。
<TextBox Text="{Binding Path=Double, StringFormat=F3}"/>
<TextBox Text="{Binding Path=Double, StringFormat=Amount: {0:C}}"/>
<TextBox Text="{Binding Path=Double, StringFormat=Amount: /{0:C/}}"/>
<TextBox>
<TextBox.Text>
<Binding Path="Double" StringFormat="{}{0:C}"/>
</TextBox.Text>
</TextBox>
<TextBox>
<TextBox.Text>
<MultiBinding StringFormat="{}{0:F2} = {1:D}">
<Binding Path="Double" />
<Binding Path="Date"/>
</MultiBinding>
</TextBox.Text>
</TextBox>
<TextBox>
<TextBox.Text>
<Binding Path="Date" StringFormat="{}{0:MM/dd/yyyy}"/>
</TextBox.Text>
</TextBox>
<ListBox Background="Beige" ItemStringFormat="F3">
<sys:Double>1.11122</sys:Double>
<sys:Double>2.11345</sys:Double>
</ListBox>
<GroupBox Background="AliceBlue" Content="{Binding Path=Double}" ContentStringFormat="F4"
Header="{Binding Path=Double}" HeaderStringFormat="F5"/>
<Label Content="{Binding Path=Double}" ContentStringFormat="{}{0:E2}"/>
<GridView>
<GridViewColumn Header="Date"
DisplayMemberBinding="{Binding XPath=Date, StringFormat=D}" />
- WPF SP1新功能—StringFormat
- wpf StringFormat
- WPF中StringFormat的用法
- WPF中StringFormat的用法
- wpf 中使用StringFormat的技巧
- WPF中StringFormat 格式化 的用法
- wpf 中使用StringFormat的技巧
- WPF中StringFormat的用法 (转)
- stringformat
- StringFormat
- StringFormat
- WPF在XAML中Binding使用StringFormat属性
- wpf中的 绑定Binding MultiBinding StringFormat格式转化问题
- Windows Vista SP1新功能:创建恢复光盘
- Silverlight/wpf DataGrid TextBox 等控件内容 Binding 中日期格式 StringFormat
- 2010.01.01 WPF/Silverlight vs2008 sp1
- Visual Studio 2010 SP1即将发布,新功能概览
- Spread for WPF-Silverlight 新功能使用指南
- Linux中如何校验哪些端口正在监听
- 深入解析 Windows Mobile 5.0 Smartphone 版
- 分页存储过程
- 令人迷糊的网络技术概念
- 有效的友情连接策略
- WPF SP1新功能—StringFormat
- 从DOS下装系统
- 有没有在成都业余做网站源码的
- IE与FF中兼容
- SQL外部链接解决方案 实例
- WINDOWS智能手机扫盲
- 设备主数据ale同步配置
- oracle,Cannot SET AUTOTRACE解决问题
- LINUX智能操作系统扫盲