2007年11月
对XAML进行编辑操作的辅助类:对选中的XAML进行操作; 对XAML代码进行对齐整理; 对XAML标记进行着色显示等。阅读全文>
发表于 @ 2007年11月30日 11:46:00|评论(loading...)|编辑
FrameworkPropertyMetadataOptions Enumeration:Specifies the types of framework-level property behavior that pertain to a particular dependency property in the Windows Presentation Foundation (WPF) property system.阅读全文>
发表于 @ 2007年11月25日 18:01:00|评论(loading...)|编辑
WPF应用程序顶级标签一定是Window吗? 很多人误以为是。可是,答案却是否定的。本篇通过将Window标签改为Page,Canvas,StackPanel等,说明了WPF中窗体的顶级标签不一定是Window,并比较了显示效果的差异。阅读全文>
发表于 @ 2007年11月25日 09:55:00|评论(loading...)|编辑
在WPF中,可以使用System.Windows.Markup.XamlWriter.Save(objName)得到任何Object对象的XAML代码。阅读全文>
发表于 @ 2007年11月23日 20:46:00|评论(loading...)|编辑
制作要点:(1) 使用System.Windows.Threading.DispatcherTimer;(2) 设置Window属性。阅读全文>
发表于 @ 2007年11月21日 17:48:00|评论(loading...)|编辑
有时,我们在WPF中,需要将用户输入的四个数字字符串值(比如:"10,10,300,300")转为Rect,比如用来画矩形,或者是设置成画刷的ViewPort属性等。怎么做呢?答案是:使用RectConverter阅读全文>
发表于 @ 2007年11月21日 17:31:00|评论(loading...)|编辑
要点:RadioButton内容中包含Image,同时,将同组设置Checked属性相同。阅读全文>
发表于 @ 2007年11月21日 17:18:00|评论(loading...)|编辑
WPF中的小字体下的文字变得比较模糊问题,我曾试图设定SnapsToDevicePixels="True",但“涛声依旧”。看来,这可能是WPF对文字的处理机制有点不太好,希望可以改进,否则,是会影响一大批人的:)阅读全文>
发表于 @ 2007年11月20日 17:24:00|评论(loading...)|编辑
将Window的WindowStyle属性设置为None,即WindowStyle="None" 。如果是非矩形的异形窗体,则需要将背景设为Null,将允许透明设置为True,也就是:Background="{x:Null}" AllowsTransparency="True",可能有些人还希望这个窗口可以拖来拖去,那么,就还需要设置MouseLeftButtonDown事件,比如:MouseLeftButtonDown="DragWindow",这里DragWindow由Window的DragMove()来完成。想关闭窗口?那就自己做一个按钮,然后使用Window本身的Close()方法吧。阅读全文>
发表于 @ 2007年11月19日 19:41:00|评论(loading...)|编辑
设置ListView的GroupStyle属性,在需要折叠隐藏的区域使用Expander阅读全文>
发表于 @ 2007年11月13日 18:34:00|评论(loading...)|编辑
Currently two methods can be used to achieve the effect. One is to restyle GridViewColumnHeader to remove the gripper inside its Template. The other is to subclass GridViewColumn to restrict columns' width to a fixed size. Today's topic is about the second solution. 阅读全文>
发表于 @ 2007年11月13日 18:04:00|评论(loading...)|编辑