在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
一、路由事件1.定义、注册、封装路由路由事件和依赖属性的定义类似 public abstract class ButtonBase : ContentControl { public static readonly RoutedEvent ClickEvent; static ButtonBase() { ClickEvent = EventManager.RegisterRoutedEvent("Click", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(ButtonBase)); } public event RoutedEventHandler Click { add { AddHandler(ClickEvent, value); } remove { RemoveHandler(ClickEvent, value); } } } 路由事件封装成普通都能访问的事件 add 和remove
2.共享路由
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论