摘要: 1 <Window x:Class="WPFBookDemo1.MainWindow" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 Title="MainWindow" Height="372" Width="599"> 5 <Grid Horizon 阅读全文
posted @ 2012-09-28 14:46 在 水 一 方 阅读(3574) 评论(0) 推荐(0) 编辑
摘要: StreamResourceInfo sri=Application.GetResourceStream( new Uri("stop.ani",UriKind.Relative)); Cursor customCurrsor=new Cursor (sri.Stream); this.Cursor=customCurrsor;Cursor对象不直接支持URI资源语法,通过该语法其它WPF元素(如Image对象)可以使用保存在编译过的程序集中的文件,然后。为应用程序添加光标文件作为资源,然后作为可以用于构造Cur... 阅读全文
posted @ 2012-09-28 14:30 在 水 一 方 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 通过 FrameWorkPropertyMetadata 对象 使用 CoerceValueCallBack回调,下面是一个示例, FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata(); metadata.CoerceValueCallback = new CoerceValueCallback(CoerceMaxValue); DependencyProperty.Register("Maximum", typeof(double), typeof(RangeBase), metada.. 阅读全文
posted @ 2012-09-28 10:51 在 水 一 方 阅读(2362) 评论(2) 推荐(0) 编辑
摘要: Visible元素在窗体中正常显示Collaspsed元素不显示,也不占用空间Hidden元素不显示,但是任然为它保留空间 阅读全文
posted @ 2012-09-28 09:44 在 水 一 方 阅读(9966) 评论(1) 推荐(1) 编辑