
WPF
i学长的猫
这个作者很懒,什么都没留下…
展开
-
WPF 全局异常处理
1.主线程异常2. 子线程异常 (Task Thread BackgroundWorker)Task 异常 上述两种异常都没有拦截到 , 可以通过observationThread 异常 非UI线程捕获到的backgroundWorker上述两种异常都没有拦截到 ,因为backgroundWorker 内部会捕获 。需要在内部判断,内部抛出后在上层可以 通过 UI线程异常捕获到completed 之后交给主线程执行3. Dispat...原创 2020-12-14 17:03:12 · 723 阅读 · 0 评论 -
C# dataTable分组汇总 , distinct
using System;using System.Data;using System.Linq;namespace ConsoleApp1{ class Program { static void Main(string[] args) { DataTable dt = new DataTable("cart"); DataColumn dc1 = new DataColumn("time", Ty...原创 2020-12-11 10:01:30 · 4219 阅读 · 0 评论 -
WPF StringFormat ContentStringFormat
原创 2020-12-09 15:14:52 · 1284 阅读 · 0 评论 -
【WPF】窗体项目 生成dll类库文件
我想把一个wpf应用程序的输出类型由windows应用程序改为类库该怎么做,直接在项目属性里改的话报错为 库项目文件无法指定applicationdefinition属性wpf窗体项目运行之后bin/debug下面只有.exe文件,现在想要生成dll文件供其他第三方引用的实现方法。1、删除App.xaml文件2、将项目属性--应用程序--输出类型 改为类库。下面可以没有,经测试,上...原创 2019-11-25 16:04:37 · 3197 阅读 · 3 评论 -
WPF TextBox 禁用输入法
xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"<TextBox Grid.Row="4" Grid.Column="1" ...原创 2019-07-05 18:05:21 · 4058 阅读 · 0 评论 -
WPF CheckBox 触发器 设置选中红色
原创 2019-08-07 12:48:19 · 2048 阅读 · 0 评论 -
【C#WPF】 样式-外联
1. 新建资源字典 xamleg:<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...原创 2018-08-23 10:55:14 · 388 阅读 · 0 评论 -
【C#WPF】style
代码:<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Themes="clr-namespace:Microsof...原创 2018-08-23 08:30:19 · 546 阅读 · 0 评论