吴佳鑫的个人专栏

当日事当日毕,没有任何借口

导航

2012年8月5日

Silverlight设计时特性的使用

摘要: 1.[Category("MyCategory")]:属性分组,让设计师能在“属性的海洋”中快速找到自己需要的属性2.[EditorBrowsable(EditorBrowsableState.Advanced)]:属性隐藏,把不常用的属性放在隐藏面板中,在需要时才展开面板3.[Description("This is a number of clicking.")]:属性描述,提示设计师该属性的作用和注意事项4.[AlternateContentProperty]:控件内容,在对象树中,提供UI元素插入的功能5.Style 和 Template类型的属 阅读全文

posted @ 2012-08-05 22:28 _eagle 阅读(408) 评论(0) 推荐(0) 编辑

silverlight storyboard

摘要: 一个 storyboard 实际是由多个 TimeLine 来组成上图可以看出storyBoard中有一个属性是Children,它是TimelineCollection类型,就是说它包含了多个Timeline,见下图:来一个例子:看看XAML生成的代码,上面有两个DoubleAnimationUsingKeyFrames,但实际上是一个Timeline。但是在CS代码中,我们打出DoubleAnimationUsingKeyFrames,按F12可以看出它也是继承于 TimeLine示例图的红线可以看到,一个Timeline实际上是对应的是某一个控件的某一个属性的变化过程。一个Timelin 阅读全文

posted @ 2012-08-05 22:14 _eagle 阅读(575) 评论(0) 推荐(0) 编辑

silverlight ItemTemplate和ItemPanel实例

摘要: 先定义一个Panel。好让下面的演示:using System.Windows.Controls;using System.Windows;namespace Class3Samples{ public class CyclePanel : Panel { protected override System.Windows.Size ArrangeOverride(System.Windows.Size finalSize) { int count = this.Children.Count; Point ce... 阅读全文

posted @ 2012-08-05 02:01 _eagle 阅读(908) 评论(0) 推荐(0) 编辑

silverlight style和template 使用之tip

摘要: Style:1、 Control Style这是最基本的样式---控制样式,包括SL自带的控件和自定义控件。•TargetType: Button -- SL自带的控件 TargetType: local:MyControl -- 自定义的控件。 local是命名空间。View Code <Style x:Key="ButtonStyle1" TargetType="Button"> <Setter Property="Background" Value="#FF1F3B53"/> < 阅读全文

posted @ 2012-08-05 01:06 _eagle 阅读(1537) 评论(0) 推荐(1) 编辑