Fork me on Github
上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: WPF的 PasswordBox 的 Password 属性不是依赖属性,不能绑定。为了实现这个控件的MVVM模式,可以利用附加属性实现 PasswordBox 控件的绑定使用。其主要的思想是,设计一个PasswordBoxHelper 类型,并在其中定义一个附加属性,这个属性的名称也叫 Passw 阅读全文
posted @ 2025-05-17 21:32 昂昂呀 阅读(30) 评论(0) 推荐(0)
摘要: 1.创建消息事件类,继承发布订阅事件类 PubSubEvent /// <summary> /// 发布订阅 消息事件类 /// </summary> public class MsgEvent : PubSubEvent<string> { } 2.获取事件聚合器 IEventAggregator 阅读全文
posted @ 2025-05-14 22:12 昂昂呀 阅读(32) 评论(0) 推荐(0)
摘要: 一.注册对话框 /// <summary> /// 注入服务 /// </summary> /// <param name="containerRegistry"></param> /// <exception cref="NotImplementedException"></exception> 阅读全文
posted @ 2025-05-13 23:08 昂昂呀 阅读(230) 评论(0) 推荐(0)
摘要: using OfficeOpenXml; // 写入到 Excel 文件 string filePath = "C:\\Users\\Administrator\\Desktop\\output.xlsx"; ExcelPackage.License.SetNonCommercialPersonal 阅读全文
posted @ 2025-05-12 23:10 昂昂呀 阅读(50) 评论(0) 推荐(0)
摘要: 一、导航中传递参数 1.通过NavigationParameters中的Add方法,以键值对的方式传递参数 /// <summary> /// 改变显示用户控件 /// </summary> /// <param name="ViewName"></param> private void ShowC 阅读全文
posted @ 2025-05-12 22:14 昂昂呀 阅读(77) 评论(0) 推荐(0)
摘要: 一、添加引入导入(不推荐) 1.将要导入模块的输出类型改为类库 2.添加要导入模块的配置文件 public class ModuleAProfile : IModule { public void OnInitialized(IContainerProvider containerProvider) 阅读全文
posted @ 2025-05-11 18:39 昂昂呀 阅读(36) 评论(0) 推荐(0)
摘要: MainView.xaml <Grid> <Grid.RowDefinitions> <RowDefinition Height="30" /> <RowDefinition /> </Grid.RowDefinitions> <StackPanel Orientation="Horizontal" 阅读全文
posted @ 2025-04-21 11:13 昂昂呀 阅读(33) 评论(0) 推荐(0)
摘要: public class ObservableObject : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public void RaisePropertyChanged([C 阅读全文
posted @ 2025-04-21 10:39 昂昂呀 阅读(15) 评论(0) 推荐(0)
摘要: 一、DelegateCommand<T>(推荐) public class DelegateCommand : ICommand { public event EventHandler CanExecuteChanged; private Action action; public Delegate 阅读全文
posted @ 2025-04-21 10:38 昂昂呀 阅读(16) 评论(0) 推荐(0)
摘要: 1.Ads连接 /// <summary> /// 摘要:打开ADS连接,无参数 /// </summary> /// <returns>返回是否成功连接结果bool</returns> public bool ADSConn() { try { //连接ADS adsClient.Connect( 阅读全文
posted @ 2025-04-14 14:27 昂昂呀 阅读(20) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 10 下一页