所谓的潇洒

导航

2024年3月15日 #

理解前台线程和后台线程

摘要: 步骤: 1.准备一个测试程序,主窗口中通过按钮调起子窗口 2.子窗口添加启动线程的按钮,按钮事件代码见下方 3.禁用前台线程并启用后台线程代码,运行程序,显示子窗口,启动线程,关闭子窗口,控制台有打印输出,关闭主窗口,调试停止,打印停止 4.禁用后台线程并启用前台线程代码,运行程序,显示子窗口,启动 阅读全文

posted @ 2024-03-15 16:52 所谓的潇洒 阅读(3) 评论(0) 推荐(0) 编辑

2024年1月22日 #

ComboBox异常 System.InvalidOperationException: 当 ItemsSource 正在使用时操作无效。改用 ItemsControl.ItemsSource 访问和修改元素。

摘要: 代码如下: cbb_users.ItemsSource = users; foreach (var item in otherUsers) { if (!tbxDoctorName.Items.Contains(item.name)) { tbxDoctorName.Items.Add(item.n 阅读全文

posted @ 2024-01-22 10:36 所谓的潇洒 阅读(111) 评论(0) 推荐(0) 编辑

2023年8月25日 #

二维数组和交错数组

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Prog 阅读全文

posted @ 2023-08-25 11:44 所谓的潇洒 阅读(11) 评论(0) 推荐(0) 编辑

2023年8月11日 #

DataGrid修改选中行背景色

摘要: 刚开始用DataGrid.RowStyle,但是这样导致行间距什么的都变了,想用baseOn又不知道继承哪个样式 最终用了CellStyle,但是这样MouseOver效果没法整行实现 <DataGrid.CellStyle> <Style TargetType="DataGridCell"> <S 阅读全文

posted @ 2023-08-11 16:29 所谓的潇洒 阅读(132) 评论(0) 推荐(0) 编辑

handycontrol.Pagination修改页背景色

摘要: UI说这个背景色太深了,让我改下,尝试了Background不管用,又搜不到相关资料,所以就下源码找办法 Gitee源码地址 https://gitee.com/handyorg/HandyControl/ 最终解决办法 HandyControl.Controls.VisualElement.Set 阅读全文

posted @ 2023-08-11 16:24 所谓的潇洒 阅读(178) 评论(0) 推荐(0) 编辑

2023年3月19日 #

Dialog

摘要: 1.自定义对话框xaml <UserControl x:Class="NavigationApp.Views.MyDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://sch 阅读全文

posted @ 2023-03-19 23:33 所谓的潇洒 阅读(43) 评论(0) 推荐(0) 编辑

Navigation

摘要: public class MainWindowViewModel : BindableBase { private string _title = "Prism Application"; public string Title { get { return _title; } set { SetP 阅读全文

posted @ 2023-03-19 22:31 所谓的潇洒 阅读(19) 评论(0) 推荐(0) 编辑

事件聚合器

摘要: 1.定义事件 public class MessageEvent : PubSubEvent<String> { } 2.发布和订阅 private readonly IEventAggregator _eventAggregator; //构造函数添加事件聚合器参数 public ViewAVie 阅读全文

posted @ 2023-03-19 18:42 所谓的潇洒 阅读(34) 评论(0) 推荐(0) 编辑

复合命令

摘要: public class ViewAViewModel : BindableBase { private string _message; public string Message { get { return _message; } set { SetProperty(ref _message, 阅读全文

posted @ 2023-03-19 18:07 所谓的潇洒 阅读(18) 评论(0) 推荐(0) 编辑

Module

摘要: 1.模块加载方式:配置文件、代码、xmal 2.配置文件加载模块 1>创建模块,并在模块初始化方法中添加如下代码 public void OnInitialized(IContainerProvider containerProvider) { var registerManager = conta 阅读全文

posted @ 2023-03-19 17:42 所谓的潇洒 阅读(82) 评论(0) 推荐(0) 编辑