work hard work smart

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

2011年9月8日

摘要: 为WPF添加Windows窗体控件1、通过XAML实现1)添加WindowsFormIntegration.dll引用 引用命名空间 xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"2)通过XAML来实现 <Grid x:Name="myGrid"> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> </Grid.RowDefinition 阅读全文

posted @ 2011-09-08 23:13 work hard work smart 阅读(1262) 评论(0) 推荐(0) 编辑

摘要: 1、把Win32的按钮添加到WPF窗口中1)添加如下的using指令using System.Windows.Interop;using System.Runtime.InteropServices;2)创建Win32ButtonHost类 public class Win32ButtonHost : HwndHost { IntPtr hwndHost = IntPtr.Zero; IntPtr hwndButton = IntPtr.Zero; public int ButtonWidth = 0; ... 阅读全文

posted @ 2011-09-08 22:10 work hard work smart 阅读(1662) 评论(0) 推荐(0) 编辑