上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
摘要: 今天,我向大家介绍一款WPF后台框架,以及,它的用法。 官网 https://prismlibrary.com/ Prism 框架是一个用于构建松耦合、可维护且可测试的 WPF 和 Xamarin.Forms 应用程序的开源框架。在 Prism 中,IContainerRegistry 接口用于注册 阅读全文
posted @ 2024-03-10 13:58 孤沉 阅读(546) 评论(0) 推荐(0)
摘要: 在java中springboot的配置应用了自动扫描 @ComponentScan(value = {"com.example", "com.fox"}) 而对于Asp.Net Core 可以使用Scrutor static void Main(string[] args) { var collec 阅读全文
posted @ 2024-03-09 14:22 孤沉 阅读(53) 评论(0) 推荐(0)
摘要: 直接上代码 public interface IRepository { Task<bool> QueryAllList(); } public class Repository : IRepository { public Task<bool> QueryAllList() { } } publi 阅读全文
posted @ 2024-03-08 15:15 孤沉 阅读(71) 评论(0) 推荐(0)
摘要: WPF的绑定实在是太强大了 1、正常情况下,我们的绑定是这样的,打印HelloWorld <TextBlock Width="200" Height="30" FontSize="20" Text="{Binding Content}"/> private string _content; publ 阅读全文
posted @ 2024-03-08 09:06 孤沉 阅读(34) 评论(0) 推荐(0)
摘要: 1、ItemsControl用来显示一个数据项的集合,它的底层是一个列表,它可以非常灵活的展示布局和数据 以下是例子 <ItemsControl ItemsSource="{Binding Student}"> <ItemsControl.ItemTemplate> <DataTemplate> < 阅读全文
posted @ 2024-03-08 08:56 孤沉 阅读(242) 评论(0) 推荐(0)
摘要: 在使用WPF的时候对int或者bool类型进行绑定出现InvalidCastException: T for DelegateCommand is not an object nor Nullable. <Button Width="200" Height="30" Content="按钮" Com 阅读全文
posted @ 2024-03-06 12:25 孤沉 阅读(290) 评论(0) 推荐(0)
摘要: 在WPF中有时候不想将命令写在List中,但是却要在前端绑定的List中写入命令 暂时知道两种解决方法 1、 Command="{Binding DataContext.NavicateCommand, RelativeSource={RelativeSource AncestorType=List 阅读全文
posted @ 2024-02-26 17:30 孤沉 阅读(72) 评论(0) 推荐(0)
摘要: 在C#中父类可以直接转子类,叫做协变 子类转父类需要添加强制转换,叫做逆变 public class Person { } public class Student:Person { } var p = new Person(); p = new Student(); //协变是父类转子类,可以直接 阅读全文
posted @ 2024-02-23 09:49 孤沉 阅读(32) 评论(0) 推荐(0)
摘要: 1、自定义配置 <?xml version="1.0" encoding="utf-8" ?> <configuration> <log4net> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAp 阅读全文
posted @ 2024-02-21 20:37 孤沉 阅读(25) 评论(0) 推荐(0)
摘要: 1、我们在做工控项目的时候通常设置配方的上下限 这个时候要求OK数在上下限范围之内,否则NG 首先我们绑定一个简单的List用来展示数据,我这里用学生Age来展示 <ListView ItemsSource="{Binding DataList}" Margin="20"> <ListView.Vi 阅读全文
posted @ 2024-02-02 22:28 孤沉 阅读(91) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页