摘要:
接下来是缩进,没有缩进的Tree怎么看都不顺眼。首先,定义节点深度Depth(注:回叫方法暂没有代码,以后要用到): 1: /// 2: /// Using a DependencyProperty as the backing store for Depth. This enables animation, styling, binding, etc... 3: /// 4: public static readonly DependencyProperty DepthProperty = 5: DependencyProperty.Register("Depth", t 阅读全文
posted @ 2013-09-03 19:16
长白山
阅读(361)
评论(0)
推荐(0)
摘要:
由于Writer嫌我文章过长,只能把上篇拆开两半了。以下是接着上篇的。准备工作做完了,现在就要完成点击事件。定义Expander和单击事件: 1: /// 2: /// The togglebutton for expanding or collapsing the items when mouse left button clicked on it 3: /// 4: private ToggleButton expander; 5: 1: /// 2: /// Gets or sets the toggle button Expander 3: /// 4: pub... 阅读全文
posted @ 2013-09-03 19:14
长白山
阅读(388)
评论(0)
推荐(0)
摘要:
TreeView的树形结构都以缩进方式显示,现在来完成这部分。首先,要定义出每个节点上都包含什么东西。先看看Win7资源管理器的TreeView:图2.1 资源管理器一个通用的TreeView至少有缩进,箭头,Header。但是我们常常会用到勾选功能,也会用到图标来达到更高的友好度,因此这里暂时先按一下的格局来定义:缩进箭头选择框图标显示文字 子节点那么开始了。用上次的模板,把Root分成两行,在Root的第一行中添加一个Border,用来放置节点的所有物件;在第二行中添加一个ItemsPresenter,名为ItemsHost,用来表示子节点集合。接着在Border中再添加一个Grid用来布 阅读全文
posted @ 2013-09-03 19:13
长白山
阅读(343)
评论(0)
推荐(0)
摘要:
原文路径:http://blog.csdn.net/wlanye/article/details/7265457很多人都对MS自带的控件不太满意(虽然MS走的是简约风格),都会试图去修改或创建让自己满意的控件,当然我也不例外。同时,这个系列只是为了记录我学习Silverlight的过程。新建一个Class,命名为FancyTreeView,让它继承自ItemsControl,并实现构造函数如下: 1: public FancyTreeView() 2: { 3: this.DefaultStyleKey = typeof(FancyTreeView); 4: } 5: this.Defau.. 阅读全文
posted @ 2013-09-03 18:38
长白山
阅读(383)
评论(0)
推荐(0)
摘要:
http://www.cnblogs.com/zhouyinhui/archive/2007/03/28/690993.html 阅读全文
posted @ 2013-09-03 18:07
长白山
阅读(211)
评论(0)
推荐(0)
摘要:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->GeorgeJohnReminderDon't forget the meeting! 阅读全文
posted @ 2013-09-03 17:14
长白山
阅读(847)
评论(0)
推荐(0)
浙公网安备 33010602011771号