摘要: 参考:https://www.cnblogs.com/chenshibao/p/18937359 开发工具:Visual Studio2022 使用资源字典实现。首先创建在项目下新建多语言目录,新建语言资源 en-US.xaml内容 <ResourceDictionary xmlns="http:/ 阅读全文
posted @ 2025-10-23 16:42 山水蒙! 阅读(5) 评论(0) 推荐(0)
摘要: xaml <Button ContextMenuService.IsEnabled="False" PreviewMouseLeftButtonDown="Button_PreviewMouseLeftButtonDown" Width="100" Height="30" Content="..." 阅读全文
posted @ 2025-08-31 22:10 山水蒙! 阅读(16) 评论(0) 推荐(0)
摘要: 参考https://www.cnblogs.com/sntetwt/p/11448435.html 1.打开vs2022,创建新项目 2.选择C++控制台空项目 3.添加C++文件 Test.cpp,内部代码如下 #include <iostream> #include <Windows.h> us 阅读全文
posted @ 2025-08-22 10:34 山水蒙! 阅读(109) 评论(0) 推荐(0)
摘要: xaml <Window.Resources> <AlternationConverter x:Key="AlternationConverter"> <SolidColorBrush Color="Red" /> <SolidColorBrush Color="Orange" /> <SolidC 阅读全文
posted @ 2025-08-13 18:26 山水蒙! 阅读(7) 评论(0) 推荐(0)
摘要: 方案 A:手写一个 20 行不到的防抖器 添加防抖动类Debouncer.cs using System; using System.Timers; using System.Windows.Threading; // 如果是 WPF 需要回到 UI 线程 public class Debounce 阅读全文
posted @ 2025-08-11 22:08 山水蒙! 阅读(13) 评论(0) 推荐(0)
摘要: 定义转换器需要实现IValueConverter接口,例如我们根据数字(3,2,1)返回不同的爵位(公,侯,伯) public class MyConverter : IValueConverter { public object Convert(object value, Type targetT 阅读全文
posted @ 2025-08-10 23:12 山水蒙! 阅读(16) 评论(0) 推荐(0)