masterfy

 

随笔分类 -  WPF

怎样控制WPF GroupBox.HeaderTemplate中的控件
摘要:Border headborder = (Border)GroupBoxUC.Template.FindName("Header", GroupBoxUC); ContentPresenter headContentPresenter = (ContentPresenter)headborder.Child; DataTemplate datatemp = GroupBoxUC.HeaderTemplate; txtheader = (TextBlock)datatemp.FindName("txtHeader", headContentPresenter); btnBack = datatemp.FindName("btnBack", headContentPresenter) as Button; btnForward = datatemp.FindName("btnForward", headContentPresenter) as Button; 阅读全文

posted @ 2009-07-20 22:06 masterfy 阅读(3104) 评论(0) 推荐(0)

WPF设置浏览器页面标题
摘要://MainPage.xaml.cs的代码 public partial class MainPage : Page { public MainPage() { InitializeComponent(); } private void Page_Loaded(object sender, RoutedEventArgs e) { //设置浏览器页面标题 this.WindowTitle = Co... 阅读全文

posted @ 2009-06-11 11:21 masterfy 阅读(362) 评论(0) 推荐(0)

如何在WPF中调用Winform控件 (转)
摘要:1、添加两个引用:WindowsFormsIntegration.dll (负责整合WPF和Windows)、System.Windows.Forms. 2、在 XAML文件中添加两个引用(粗体部分): 阅读全文

posted @ 2009-04-06 10:06 masterfy 阅读(2630) 评论(0) 推荐(0)

导航