2014年3月27日

ItemsControl Grouping分组

摘要: ItemsControl属性GroupStyleGrouping再ItemsControl源代码 1 public class ItemsControl : Control, IAddChild, IGeneratorHost 2 { 3 public static readonly DependencyProperty GroupStyleSelectorProperty; 4 private ObservableCollection _groupStyle = new ObservableCollection(); 5 6 public ObservableCol... 阅读全文

posted @ 2014-03-27 01:39 饶华刚 阅读(1101) 评论(0) 推荐(0)

2014年3月22日

WPF CanExecuteChanged

摘要: 继承ICommand ,RelayCommand命令 1 public class RelayCommand : ICommand 2 { 3 private readonly Action _execute; 4 private readonly Func _canExecute; 5 public event EventHandler CanExecuteChanged; 6 public RelayCommand(Action execute) : this(execute, null) 7 { 8 ... 阅读全文

posted @ 2014-03-22 23:17 饶华刚 阅读(2167) 评论(0) 推荐(0)

2014年3月20日

WPF 控件树

摘要: WPF控件树按照基类进行分类,记录下来便于编写自定义控件时查阅RangeBase范围控件Thumb拖到控件TextBoxBase文本控件ItemControl组控件ContrentControl内容控件 阅读全文

posted @ 2014-03-20 20:19 饶华刚 阅读(271) 评论(0) 推荐(0)

2014年3月15日

Bingding模型

摘要: publicabstractclassBinding : IDefaultCommunicationTimeouts1 public virtual IChannelListener BuildChannelListener(Uri listenUriBaseAddress, string listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) where TChannel : class, IChannel2 {3 thi... 阅读全文

posted @ 2014-03-15 01:37 饶华刚 阅读(270) 评论(0) 推荐(0)

2014年2月18日

WCF中的AsyncPattern

摘要: WCF中的AsyncPattern(系列博文源自 http://pfelix.wordpress.com/,由笔者翻译并整理,转载请注明)在wcf 的 service contract中, 服务接口方法定义都要求有 operation context这个标签。 在这个标签里有一个 AsyncPattern的属性用以定制 service的异步模型。考虑如下接口定义:1: [ServiceContract] 2: interface IService { 3: [OperationContract] 4: ReplyData Operation1(RequestData... 阅读全文

posted @ 2014-02-18 02:47 饶华刚 阅读(1012) 评论(0) 推荐(0)

2013年7月24日

WPF中获取指定坐标依赖对象数据项

摘要: 上图中红色框区域是一个自定义的ListBox控件,需要实现的功能是,点击红框区域中某项时,获取当前选中项的数据项 控件的MouseDown事件部分代码为: 1 var x = TreeHelper.FindPointProperty(this, scrollStartPoint); 2 i... 阅读全文

posted @ 2013-07-24 23:56 饶华刚 阅读(1039) 评论(0) 推荐(0)

导航