上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: public class TextBoxExtHelper { public static string GetIsNullString(DependencyObject obj) { return (string)obj.GetValue(IsNullStringProperty); } publ 阅读全文
posted @ 2020-04-24 13:41 liuyong111 阅读(432) 评论(0) 推荐(0) 编辑
摘要: var strPath = @"D:\Test\4#新程序全兼容\4#新程序全兼容\Data"; string myConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strPath + ";Extended Pr 阅读全文
posted @ 2020-04-24 10:39 liuyong111 阅读(508) 评论(0) 推荐(0) 编辑
摘要: MarkupExtension 标记扩展。wpf中已实现了很多MarkupExtension。如binding,x:StaticResource等等。通过继承MarkupExtension,我们可以自定义标记。 public class ColorExtend : MarkupExtension { 阅读全文
posted @ 2020-04-22 15:57 liuyong111 阅读(525) 评论(0) 推荐(0) 编辑
摘要: public class DecimalConverter:IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInf 阅读全文
posted @ 2020-03-16 16:30 liuyong111 阅读(1836) 评论(2) 推荐(0) 编辑
摘要: WPF程序捕获全局异常,遇到未处理的异常,虽可以捕获,但是不能阻止程序退出。 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledExcepti 阅读全文
posted @ 2019-12-31 14:46 liuyong111 阅读(857) 评论(0) 推荐(0) 编辑
摘要: 一、Pull Up Field 提取字段 多个类中有相同的字段,可以提取到父类中。 重构前: public class Engineer { public string name { get; set; } } public class Salesman { public string name { 阅读全文
posted @ 2019-12-27 14:36 liuyong111 阅读(1004) 评论(0) 推荐(0) 编辑
摘要: 一般我们WPF中都加全局捕获,避免出现异常导致崩溃。 Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException; AppDomain.CurrentDomain.Unhandled 阅读全文
posted @ 2019-11-14 17:07 liuyong111 阅读(2144) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2019-07-29 14:50 liuyong111 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 上面的是datagrid第一列的单元格背景色根据值改变。 阅读全文
posted @ 2019-07-15 18:47 liuyong111 阅读(1953) 评论(5) 推荐(0) 编辑
摘要: 功能类似dev的layoutcontrol,layoutgroup,layoutitem. 用法如下: 不管label字段有多长,KDLayoutControl会设置容器内所有的label长度一致。 阅读全文
posted @ 2019-07-02 17:21 liuyong111 阅读(1109) 评论(2) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页