随笔分类 - wpf
摘要:public IEnumerable GetOpenPopups() { return PresentationSource.CurrentSources.OfType() .Select(h => h.RootVisual) ...
阅读全文
摘要:最近ms 更新对WPF支持,http://blogs.msdn.com/b/dotnet/archive/2014/11/12/the-roadmap-for-wpf.aspxWork on improving WPF has never really stopped, and bel...
阅读全文
摘要:最近美国的PM传来消息,说微软在收集开发者的意见,会对WPF进行改进,微软会主要在1) performance 2) interop 3) touch and 4) access to WinRT APIs这4个方面有所改进。期待微软在下一个framwork中能给我们带来一些惊喜吧?
阅读全文
摘要:最近看到一个bog.http://www.codeproject.com/Articles/818281/Is-WPF-dead-the-present-and-future-of-WPF大体上讲了一下WPF的现状,其实我们从微软的最近的态度也能看出些什么,微软在把精力都转移到了WINRT上面...
阅读全文
摘要:[DllImport("user32.dll")]publicstaticexternIntPtrGetAncestor(IntPtrhWnd,intflags);vardialog=newCustomiDalog(); window=newWindow();window.Content=dialo...
阅读全文
摘要:目的 如果要在XAML里引用静态或动态对象实例,或在XAML中创建带有参数的类。这时,我们需要用到XAML扩展。XAML扩展常用来设定属性值。使用标识扩展,告诉 XAML 处理不要像通常那样将属性值视为文本字符串,而是通过类型转换把字符串转换为静态或动态实例。格式 当XAML编译器看到大括号{}时,把大括号中的内容解释为XAML标记扩展。 如: 有两个标识扩展,一个是Binding标识扩展,一个是StaticResource扩展。说明 1、标记扩展本身是一系列类,其基类为MarkupExtension(抽象类)。 2、从这个类中派生出十二个类,即:ResourseKey、 TypeEx.
阅读全文
摘要:View Code xaml public class WaterMarkTextBox:TextBox { public string Watermark { get { return (string)GetValue(WatermarkProperty); } set { SetValue(WatermarkProperty, value); } } // Using a DependencyProperty as the backing store fo...
阅读全文
摘要:void mydataGird_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Point aP = e.GetPosition(mydataGird); IInputElement obj = mydataGird.InputHitTest(aP); DependencyObject target = obj as DependencyObject; int i = 0; while (target !...
阅读全文
摘要:/// /// AutoCompleteComboBox /// public class AutoCompleteComboBox : ComboBox { #region DependencyProperty public string WaterMark { get { return (string)GetValue(WaterMarkProperty); } set { SetValue(WaterMarkProperty, value); } } ...
阅读全文
摘要:xaml View Code csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.I...
阅读全文
摘要:4.0里面不支持Generic.xaml里面 嵌套style4.5里面可以使用。可以在app.xaml
阅读全文
摘要:this.Template = XamlReader.Load (" ");
阅读全文
摘要:。(button使用contont写的时候) 当。button使用 依然会覆盖这段代码能消除全局textblock对button的影响 View Code textblock style这样。。b...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Controls;using System.Windows;using System.Windows.Input;namespace MyWPFCustomControls{ public class CustomTextBox : TextBox { public CustomTextBox() { } static Cu...
阅读全文
摘要:<Grid Grid.Row="3" Grid.ColumnSpan="3"> <Grid.Resources> <SolidColorBrush x:Key="BackgroundColor" Color="#00000000"/> <SolidColorBrush x:Key="ForegroundColor" C...
阅读全文
摘要:csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Media;namespace MCE.Gems.Common.Controls.CustomControls{ /// <summary> /// change textblock background color
阅读全文