摘要: 1.用DependencyProperty.RegisterAttached 2.静态Set Get方法而不是Setter Getter 3.声明附加属性的对象无需继承于DependencyObject, 因为这个时候DependencyObject对象作为方法参数传递。 阅读全文
posted @ 2023-10-24 10:04 zhangxiuju 阅读(24) 评论(0) 推荐(0)
摘要: 1.所有依赖属性的默认值保存在DependencyProperty的属性表中,读取(不写)时通过属性的HashCode检索 2.每个实例也有一张属性表,保存该实例当前依赖属性的用户值,通过DependencyProperty的Index匹配。 参考:https://blog.51cto.com/u_ 阅读全文
posted @ 2023-10-24 09:50 zhangxiuju 阅读(28) 评论(0) 推荐(0)
摘要: 1.XAML中定义DialogHost <Window <materialDesign:DialogHost x:Name="DialogHost" Identifier="Root"> <Grid> </Grid> </materialDesign:DialogHost><Window> 2.消息 阅读全文
posted @ 2023-10-20 14:24 zhangxiuju 阅读(156) 评论(0) 推荐(0)
摘要: 自定义窗体边框 <Window BorderBrush="{DynamicResource PrimaryHueDarkBrush}" BorderThickness="1"> <WindowChrome.WindowChrome> <WindowChrome ResizeBorderThickne 阅读全文
posted @ 2023-10-20 13:43 zhangxiuju 阅读(16) 评论(0) 推荐(0)
摘要: 1.Exception <TextBox Width="120" Text="{Binding Name,ValidatesOnExceptions=True,UpdateSourceTrigger=PropertyChanged}" ToolTip="{Binding RelativeSource 阅读全文
posted @ 2023-10-19 18:26 zhangxiuju 阅读(78) 评论(0) 推荐(0)
摘要: 1.添加引用 - Microsoft.Expression.Interactions.dll -System.Windows.Interactivity xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"xmlns 阅读全文
posted @ 2023-10-19 16:51 zhangxiuju 阅读(43) 评论(0) 推荐(0)
摘要: https://www.kancloud.cn/digest/xing-designpattern/143724 阅读全文
posted @ 2023-10-19 16:25 zhangxiuju 阅读(68) 评论(0) 推荐(0)
摘要: 普通触发器Trigger(MultiTrigger),数据触发器DataTrigger(MultiDataTrigger),事件触发器EventTrigger 以下三种场合都可使用,注意默认设定对象。 1.style中使用 <Style TargetType="{x:Type CheckBox}"> 阅读全文
posted @ 2023-10-19 16:19 zhangxiuju 阅读(176) 评论(0) 推荐(0)
摘要: 非导航模式 1.同一个Region可注册多个UserControl regionManager.Resolve<IRegionManager>().RegisterViewWithRegion("mainRegion", typeof(UserControl1));regionManager.Res 阅读全文
posted @ 2023-10-19 15:42 zhangxiuju 阅读(121) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/lvxingzhe3/article/details/129941884 https://www.cnblogs.com/liuww/archive/2023/06/14/17481402.html 阅读全文
posted @ 2023-10-19 15:30 zhangxiuju 阅读(20) 评论(0) 推荐(0)