摘要: 1、在xaml代码中,我们可以看到有一个的标签,同时在里面还有一句话❌Class="HelloWorld.App",它定义一个名叫App的类型,这个类型位于命令空间HelloWorld之中,与后端代码的namespace HelloWorld保持一致。我们可以将x:Class和c#里面的class关 阅读全文
posted @ 2025-09-25 17:22 鸭子进京赶烤 阅读(11) 评论(0) 推荐(0)
摘要: 1 添加接口 internal class MainViewModel : INotifyPropertyChanged { // 添加通知事件 public event PropertyChangedEventHandler? PropertyChanged; } 2 在类中添加相关参数事件调用 阅读全文
posted @ 2025-09-24 16:54 鸭子进京赶烤 阅读(11) 评论(0) 推荐(0)
摘要: 创建一个自定义命令类 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.In 阅读全文
posted @ 2025-09-24 16:02 鸭子进京赶烤 阅读(22) 评论(0) 推荐(0)
摘要: Dictionary<TKey, TValue> 一种非常常用的泛型集合类,用于存储键值对的数据结构,可以根据键快速查询对应的值,在需要快速查找和检索数据的场景下,特别是在涉及大量数据时,使用字典是非常高效的选择。 使用方法: 添加引用 GetDeviceData using System.Coll 阅读全文
posted @ 2025-08-23 16:47 鸭子进京赶烤 阅读(34) 评论(0) 推荐(1)