work hard work smart

专注于Java后端开发。 不断总结,举一反三。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年11月14日

摘要: 1、怎样在WPF中使用Windows窗体控件(如水晶报表)我们可以使用WindowsFormsHost元素在WPF中载入一个Windows Forms控件,下面的这个例子展示了如何载入一个CrystalReportViewer元素:<Window x:Class="ForumProjects.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200 阅读全文

posted @ 2011-11-14 15:46 work hard work smart 阅读(531) 评论(0) 推荐(0) 编辑

摘要: 1、不同于Windows Forms,当前WPF版本没有提供一个直接的方法可以把TreeView控件所有的节点都展开。一般来说,在WPF中有两种方法可以实现这个功能。第一种方法就像下面例子一样使用样式展开所有节点:<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ControlTest2.TreeViewTest&q 阅读全文

posted @ 2011-11-14 15:45 work hard work smart 阅读(3744) 评论(1) 推荐(1) 编辑

摘要: WPF没有像ASP.NET提供一个RadioButtonList的控件。幸运的是,我们可以利用WPF样式和模板的强大功能,用纯粹的XAML代码实现这个功能<Window x:Class="ControlTest2.ListBoxTest2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespa 阅读全文

posted @ 2011-11-14 15:45 work hard work smart 阅读(3840) 评论(0) 推荐(0) 编辑