12 2008 档案

Layout相关
摘要:1. 获得一个控件相对于另一个控件的位置//Vector vector = VisualTreeHelper.GetOffset(relativeControl);//Canvas.SetLeft(this,vector.X);//Canvas.SetTop(this, vector.Y);//UI... 阅读全文

posted @ 2008-12-25 20:01 oyl 阅读(257) 评论(0) 推荐(0)

动画相关
摘要:board.FillBehavior = FillBehavior.Stop 让动画结束后退出对目标属性的管理,这样目标属性的binding,set value 才能正常进行。 阅读全文

posted @ 2008-12-25 19:50 oyl 阅读(134) 评论(0) 推荐(0)

UIElement.CaptureMouse() and Mouse.Capture()
摘要:Capture mouse能够使 即使在控件之外也能够获取鼠标事件,拖,拉鼠标时最有用。When an element captures the mouse, it receives mouse input whether or not the cursor is within its border... 阅读全文

posted @ 2008-12-16 16:59 oyl 阅读(554) 评论(0) 推荐(0)

event handler in DataTemplate
摘要:在user control中,给data template加event handler很容易,因为user control的xaml是与cs编译成一个类, 有x:class tag. 但是在custom control 中,必须代码加入,而且要用visual tree找到data template中... 阅读全文

posted @ 2008-12-05 13:36 oyl 阅读(373) 评论(0) 推荐(0)

导航