• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Michaellln
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2024年1月19日

C#获取时间戳
摘要: #region 获取时间戳 /// <summary> /// 获取时间戳 /// </summary> /// <param name="ismilliseconds">是否获取毫秒时间戳</param> /// <returns></returns> public static long Get 阅读全文
posted @ 2024-01-19 16:54 白驹隙 阅读(696) 评论(0) 推荐(0)
 
 

2023年9月18日

WPF禁用Windows窗口自带的关闭按钮(非关闭拦截)
摘要: #region 禁用关闭按钮 [DllImport("USER32.DLL", CharSet = CharSet.Unicode)] private static extern IntPtr GetSystemMenu(IntPtr hWnd, UInt32 bRevert); [DllImpor 阅读全文
posted @ 2023-09-18 19:19 白驹隙 阅读(679) 评论(0) 推荐(0)
 
 

2022年5月25日

以圆角裁剪控件
摘要: public override void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { if (sender is FrameworkElement element) { if (e.N 阅读全文
posted @ 2022-05-25 15:52 白驹隙 阅读(33) 评论(0) 推荐(0)
 
标记RichTextBox中符合正则的文字为链接
摘要: public override void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { if (sender is RichTextBox rcontrol) { Task.Delay( 阅读全文
posted @ 2022-05-25 15:49 白驹隙 阅读(37) 评论(0) 推荐(0)
 
 

2022年5月9日

WPF中RichTextBox高度自适应问题解决方法(转载)
摘要: https://www.cnblogs.com/goxmpx/p/3741727.html 阅读全文
posted @ 2022-05-09 10:28 白驹隙 阅读(176) 评论(0) 推荐(0)
 
 

2022年4月23日

Winform中打开对应窗口标题的窗口
摘要: 1 public static class WindowsMessageHelper 2 { 3 4 public const int WM_COPYDATA = 0x004A; 5 6 [DllImport("User32.dll", EntryPoint = "SendMessage")] 7 阅读全文
posted @ 2022-04-23 12:25 白驹隙 阅读(175) 评论(0) 推荐(0)
 
 

2022年4月19日

C# 获取字符串的字节长度
摘要: System.Text.Encoding.Default.GetByteCount("中文占2个字节,英文占1个字节"); 阅读全文
posted @ 2022-04-19 17:11 白驹隙 阅读(192) 评论(0) 推荐(0)
 
 

2022年4月12日

RichTextBox解决回车的问题
摘要: richtext.AppendText("\n"); richtext.Selection.Select(richtext.Document.ContentEnd,richtext.Document.ContentEnd); 阅读全文
posted @ 2022-04-12 17:01 白驹隙 阅读(229) 评论(0) 推荐(0)
 
 

2022年4月11日

WPF中从资源中检索指定路径的图片文件
摘要: ResourceManager resourceManager = new($"{Assembly.GetExecutingAssembly().GetName().Name}.g", Assembly.GetExecutingAssembly()); ResourceSet resources = 阅读全文
posted @ 2022-04-11 15:10 白驹隙 阅读(278) 评论(0) 推荐(0)
 
 

2022年3月7日

RichTextBox 性能问题的解决方式(不用RichTextBox)
摘要: 在WPF聊天应用开发中遇到了一个RichTextBox性能问题,体现为: 1.中文打字速度正常,但英文打字较慢,会出现延迟的情况 2.文字多到上千字时,会非常卡顿 3.有个功能,需要@用户,输入@时弹出下拉框选择用户,RichTextBox做起来很麻烦 目前找到了一个比较完美的替代方案: Avalo 阅读全文
posted @ 2022-03-07 15:32 白驹隙 阅读(1245) 评论(1) 推荐(0)
 
 
下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3