摘要: 这里举例两种方式。 1. Newtonsoft.Json.JsonConvert 需要引用外部的 Newtonsoft.Json.dll /// <summary> /// 将json字符串转换为对象(使用Json.net) /// </summary> /// <param name="respo 阅读全文
posted @ 2021-03-03 19:25 鑫茂 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 1. 程序根目录: (D:\\...\\WpfApp1\\WpfApp1\\bin\\Debug") string exePath = Environment.CurrentDirectory; 2. 获取该进程的命令行 (\"D:\\...\\WpfApp1\\WpfApp1\\bin\\Debu 阅读全文
posted @ 2021-03-03 19:21 鑫茂 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 1. 若需要控制 exe 实例数量 bool ret; mutex = new System.Threading.Mutex(true, exename, out ret); if (!ret) { //"系统已经启动" Environment.Exit(0); } 2. 退出时 public Ap 阅读全文
posted @ 2021-03-03 18:43 鑫茂 阅读(794) 评论(0) 推荐(2) 编辑
摘要: 1. 点击事件的执行顺序 PreviewMouseLeftButtonDown PreviewMouseDown MouseLeftButtonDown MouseDown PreviewMouseLeftButtonUp PreviewMouseUp Click MouseLeftButtonUp 阅读全文
posted @ 2021-03-02 22:10 鑫茂 阅读(3423) 评论(0) 推荐(4) 编辑
摘要: 1. 先上效果 <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <StackPanel Margin="50 0"> <local:PaginationControl IsDisplayFirstLastPageB 阅读全文
posted @ 2021-03-02 21:35 鑫茂 阅读(712) 评论(0) 推荐(0) 编辑
摘要: <Window ... WindowStyle="None" AllowsTransparency="True" RenderTransformOrigin="0.5, 0.5"> <Window.Resources> <Storyboard x:Key="WinBootAnimation"> <D 阅读全文
posted @ 2021-02-26 22:36 鑫茂 阅读(694) 评论(0) 推荐(0) 编辑
摘要: UIElement 有 BitmapEffect 和 Effect 属性,BitmapEffect 是由 CPU 的运算能力实现的,比较耗性能,推荐使用 Effect; Effect 包括但不限于 DropShadowEffect 投影效果、BlurEffect 模糊效果。 1. 圆的投影效果及阴影 阅读全文
posted @ 2021-02-26 22:35 鑫茂 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1. Path 霸中霸 既可以替代其他几种图形,也可以将直线、圆弧、贝尔赛曲线组合起来; 重要属性:Geometry Data; 其中 Geometry 为抽象类,不可实例化,可使用其子类: LineGeometry、RectangleGeometry、EllipseGeometry、PathGeo 阅读全文
posted @ 2021-02-26 22:34 鑫茂 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 1. 绘画 1.1 图形类型 Line X1、Y1、X2、Y2,Stroke,StrokeThickness Rectangle 矩形 Ellipse 椭圆 Polygon 多边形(自动闭合) Polyline 多变形(不自动闭合) Path 1.2 线段 <Line X1="10" Y1="20" 阅读全文
posted @ 2021-02-26 22:32 鑫茂 阅读(1272) 评论(0) 推荐(1) 编辑
摘要: 1. Trigger 1.1 由属性值触发的 Trigger 最基本的触发器,Property 是关注的属性名称,value 是触发条件,一旦触发条件满足,就会应用 Trigger 的 Setters,触发条件不再满足时,各属性值会被还原。 <StackPanel> <StackPanel.Reso 阅读全文
posted @ 2021-02-26 22:22 鑫茂 阅读(186) 评论(0) 推荐(0) 编辑