zip's

while(true) { Write it down; Think about it; Refine it; Sleep(); }

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  Controls

摘要:拖动Itemhttp://marlongrech.wordpress.com/2007/12/28/drag-drop-using-listboxes-part-1/http://marlongrech.wordpress.com/2007/12/29/drag-drop-using-listboxes-part-2/选择已经选中的Item选择一个已经选中的 item :有时,需要处理选择一个已经选中的 item,可是这时 SelectionChanged 不会被再次触发。一个解决方法是,用 EventSetter 将 item 的事件代理出去。<ListBox SelectionCha 阅读全文
posted @ 2011-03-02 10:26 zip's 阅读(804) 评论(0) 推荐(0)

摘要:提示1:使用 RowDefinition.MinHeight/MaxHeight, ColumnDefinition.MinWidth/MaxWidth;使用时应尽可能靠近 virtual tree 的根部。它们都是 Attached Property,所以在使用 Grid 时才有用;[代码] 阅读全文
posted @ 2010-12-22 15:32 zip's 阅读(146) 评论(0) 推荐(0)

摘要:1,使用 WPF 自定制:用 2 个 RepeatButton,用 ViewBox 包装“”“”作为 Content ,再旋转 90 度。2,包装 Windows.Forms.DomainUpDown 或者 Windows.Forms.NumericUpDown 阅读全文
posted @ 2010-12-06 17:37 zip's 阅读(250) 评论(0) 推荐(0)

摘要:例子1 :需要获得 ListBox 中的 Canvas方法1:Loaded 事件[代码]方法2:[代码]例子2:想获取一个可编辑的 ComboBox 中的 TextBox (顺便说一句,如果不可编辑,则是个 TextBlock,可以使用 SNOOP 来观察)可编辑的ComboBox含有一个TextBox使用VisualTreeHelper找到TextBox 阅读全文
posted @ 2010-12-05 21:29 zip's 阅读(295) 评论(0) 推荐(0)

摘要:推荐阅读:http://www.codeproject.com/KB/WPF/wpfvalidation.aspxTextBox定制 Validation.ErrorTemplateTIP:这里在 ControlTemplate 里为 AdornedElementPlaceHolder 命名,方便在后面的 Binding 中引用;使用另外一个 TextBlock 显示 阅读全文
posted @ 2010-10-20 15:15 zip's 阅读(1352) 评论(0) 推荐(0)

摘要:Over View ComboBox 由一个 TextBox 一个 Button 和一个 Popup 组合而成; Data Binding 当 data binding 到 ComboBox 时,如何显示数据,有如下选择: 使用 DisplayMemberPath Code highlighting produced by Actipro CodeHighlighter (freeware)ht... 阅读全文
posted @ 2010-09-26 17:34 zip's 阅读(2126) 评论(0) 推荐(0)