08 2022 档案
摘要:默认的时候 把这个为null的去掉 只需要加入这一行代码 即可搞定 builder.Services.AddMvc().AddJsonOptions(o => { o.JsonSerializerOptions.DefaultIgnoreCondition = System.Text.Json.Se
阅读全文
摘要:话不多说直接上代码 带参数 ICommand实现代码 private readonly Action<T> _execute; private readonly Func<T, bool> _canExecute; public RelayCommand(Action<T> execute, Fun
阅读全文
摘要:先看效果 xaml代码 <UserControl x:Class="WPF控件测试.Control.Pipeline" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.
阅读全文
摘要:先上效果图 直接上代码(直接在Window.Resources里面添加这段代码) <Style TargetType="GroupBox"> <Setter Property="Margin" Value="10,5"/> <Setter Property="Template"> <Setter.V
阅读全文
摘要:一、先看效果 1 添加Nuget库 站长使用.Net Core 3.1创建的WPF工程,创建“DropDownMenu”解决方案后,需要添加两个Nuget库:MaterialDesignThemes和MaterialDesignColors,上图的效果是使用该控件库实现的,非常强大 2、项目结构 3
阅读全文