tnblog
首页
视频
资源
登录

WPF基础学习笔记

857人阅读 2025/1/4 15:16 总访问:3660651 评论:0 收藏:0 手机
分类: .net后台框架

.netcore

WPF基础学习笔记

WPF简介


在WPF(Windows Presentation Foundation)中,布局控件用于管理和组织界面元素的排列与尺寸。不同的布局控件具有不同的布局策略,了解这些控件的使用方式能够帮助我们设计更加灵活和高效的用户界面。

Grid:网格布局


Grid是WPF中最常用的布局控件之一,通常用于实现复杂的基于行和列的布局。它允许开发者通过定义行和列的RowDefinitionsColumnDefinitions来精确控制每个控件的排列位置。

  1. <Grid>
  2. <Grid.RowDefinitions>
  3. <RowDefinition Height="Auto"/>
  4. <RowDefinition Height="*"/>
  5. </Grid.RowDefinitions>
  6. <Grid.ColumnDefinitions>
  7. <ColumnDefinition Width="Auto"/>
  8. <ColumnDefinition Width="*"/>
  9. </Grid.ColumnDefinitions>
  10. <TextBlock Text="Header" Grid.Row="0" Grid.Column="0"/>
  11. <Button Content="Button 1" Grid.Row="1" Grid.Column="0"/>
  12. <Button Content="Button 2" Grid.Row="1" Grid.Column="1"/>
  13. </Grid>

特点

  • 支持动态调整行和列的大小。
  • 可以灵活地控制控件在指定单元格中的位置。
  • 支持单元格合并。

StackPanel:堆叠布局


StackPanel是一个简单的布局控件,子元素会在垂直或水平方向上顺序排列。
它适用于简洁的线性布局,如列表、工具栏或菜单等。

  1. <StackPanel Orientation="Vertical">
  2. <Button Content="Button 1"/>
  3. <Button Content="Button 2"/>
  4. <Button Content="Button 3"/>
  5. </StackPanel>

特点

  • 元素沿着指定的方向(HorizontalVertical)堆叠。
  • 子元素的大小取决于其内容的大小。

DockPanel:停靠布局


DockPanel允许将子控件停靠在容器的四个边(上、下、左、右),并自动填充剩余空间。
它非常适合于实现具有固定头部、侧边栏和内容区的布局结构。

  1. <DockPanel>
  2. <Button Content="Top" DockPanel.Dock="Top"/>
  3. <Button Content="Left" DockPanel.Dock="Left"/>
  4. <Button Content="Right" DockPanel.Dock="Right"/>
  5. <Button Content="Bottom" DockPanel.Dock="Bottom"/>
  6. <TextBlock Text="Main Content" />
  7. </DockPanel>

可以通过设置LastChildFill="False"取消让最后一个控件占满。

特点

  • 支持控件停靠在容器的上、下、左、右或填充剩余空间。
  • 默认情况下,第一个未指定停靠位置的控件会填充剩余空间。

WrapPanel:自动换行布局


WrapPanel用于将控件沿一个方向排列,当空间不足时自动换行。
它非常适合处理动态数量的元素,且不需要明确的行列定义。

  1. <WrapPanel>
  2. <Button Content="Button 1"/>
  3. <Button Content="Button 2"/>
  4. <Button Content="Button 3"/>
  5. <Button Content="Button 4"/>
  6. <Button Content="Button 2"/>
  7. <Button Content="Button 3"/>
  8. <Button Content="Button 4"/>
  9. <Button Content="Button 2"/>
  10. <Button Content="Button 3"/>
  11. <Button Content="Button 4"/>
  12. <Button Content="Button 2"/>
  13. <Button Content="Button 3"/>
  14. <Button Content="Button 4"/>
  15. <Button Content="Button 2"/>
  16. <Button Content="Button 3"/>
  17. <Button Content="Button 4"/>
  18. <Button Content="Button 2"/>
  19. <Button Content="Button 3"/>
  20. <Button Content="Button 4"/>
  21. <Button Content="Button 2"/>
  22. <Button Content="Button 3"/>
  23. <Button Content="Button 4"/>
  24. </WrapPanel>

特点

  • 元素在指定的方向上排列,当当前行或列空间不足时,自动换行。
  • 可以设置元素的宽度和高度,调整每个元素的布局。

UniformGrid:均匀网格布局


UniformGrid用于将子控件均匀地分布在一个网格中,确保每个控件的大小相同。
它自动调整控件的布局,适用于固定数量控件的布局需求。

  1. <UniformGrid Rows="2" Columns="3">
  2. <Button Content="Button 1"/>
  3. <Button Content="Button 2"/>
  4. <Button Content="Button 3"/>
  5. <Button Content="Button 4"/>
  6. <Button Content="Button 5"/>
  7. <Button Content="Button 6"/>
  8. </UniformGrid>

解析

  • UniformGrid将布局划分为2行3列,每个按钮的大小会自动调整以填充网格单元。

Canvas:绝对定位布局


Canvas用于精确控制子元素的位置,它允许开发者通过设置元素的LeftTopRightBottom属性来指定其位置。

  1. <Canvas>
  2. <Button Content="Button 1" Canvas.Left="10" Canvas.Top="20"/>
  3. <Button Content="Button 2" Canvas.Left="100" Canvas.Top="50"/>
  4. </Canvas>

特点

  • 适合需要精确控制位置的场景。
  • 使用绝对坐标定位元素。

InkCanvas:绘图和手写输入


InkCanvas是专为捕捉手写输入或绘图而设计的控件。
它提供了一个画布,用户可以在其上自由绘制线条或图形。

  1. <InkCanvas>
  2. <Button Content="Button 1" InkCanvas.Left="10" InkCanvas.Top="20"/>
  3. <Button Content="Button 2" InkCanvas.Left="100" InkCanvas.Top="50"/>
  4. </InkCanvas>

InkCanvas提供一个白色背景的画布,用户可以用手写笔或鼠标在上面进行绘制。

自定义一个排序插件


首先创建一个OrderedPanel类文件,并实现Panel类。

  1. public class OrderedPanel: Panel
  2. {
  3. // 重写 MeasureOverride 方法,用于测量子元素的方法
  4. // availableSize是父面板在布局时传递给它的空间大小。
  5. protected override Size MeasureOverride(Size availableSize)
  6. {
  7. foreach (UIElement child in InternalChildren)
  8. {
  9. // 让每个子元素都进行测量,子元素告诉父容器它需要的空间(即它的尺寸)。
  10. child.Measure(availableSize);
  11. }
  12. // 返回一个可以容纳所有子元素的尺寸
  13. return availableSize;
  14. }
  15. // 重写 ArrangeOverride 方法,用于排序和排列子元素
  16. // 确定每个子元素的 实际位置和大小。
  17. protected override Size ArrangeOverride(Size finalSize)
  18. {
  19. // 获取所有子元素,并按 Order 属性排序
  20. var sortedChildren = InternalChildren.Cast<UIElement>()
  21. .OrderBy(child => GetPROrder(child))
  22. .ToList();
  23. double currentX = 0; // X坐标,用于排列子元素
  24. // 为每个子元素进行排列
  25. foreach (UIElement child in sortedChildren)
  26. {
  27. // 获取子元素的尺寸
  28. Size childSize = child.DesiredSize;
  29. // 指定子元素实际位置和大小的方法。
  30. child.Arrange(new Rect(currentX, 0, childSize.Width, childSize.Height));
  31. // 更新当前X坐标,进行下一次排列
  32. currentX += childSize.Width;
  33. }
  34. // 返回面板最终尺寸
  35. return finalSize;
  36. }
  37. // 获取子元素的 Order 属性
  38. private int GetPROrder(UIElement element)
  39. {
  40. // 如果子元素是 Button 或者其他你希望支持的类型
  41. if (element is FrameworkElement fe)
  42. {
  43. var orderProperty = fe.GetValue(OrderProperty);
  44. return orderProperty is int order ? order : 0;
  45. }
  46. return 0; // 默认顺序是 0
  47. }
  48. // 注册 Order 属性,方便在 XAML 中使用
  49. public static readonly DependencyProperty OrderProperty =
  50. DependencyProperty.RegisterAttached("Order", typeof(int), typeof(OrderedPanel), new PropertyMetadata(0));
  51. // 设置子元素的 Order 属性
  52. public static void SetOrder(UIElement element, int value)
  53. {
  54. element.SetValue(OrderProperty, value);
  55. }
  56. // 获取子元素的 Order 属性
  57. public static int GetOrder(UIElement element)
  58. {
  59. return (int)element.GetValue(OrderProperty);
  60. }
  61. }


然后我们需要重新生成一下项目,打开我们的MainWindow.xaml文件。

  1. <Window x:Class="WpfAppPlug.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfAppPlug"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="800">
  9. <Grid>
  10. <!-- 使用自定义的 OrderedPanel -->
  11. <local:OrderedPanel>
  12. <!-- 设置每个子元素的 Order 属性 -->
  13. <Button Content="Button 1" Width="100" Height="50" local:OrderedPanel.Order="2"/>
  14. <Button Content="Button 2" Width="100" Height="50" local:OrderedPanel.Order="1"/>
  15. <Button Content="Button 3" Width="100" Height="50" local:OrderedPanel.Order="3"/>
  16. </local:OrderedPanel>
  17. </Grid>
  18. </Window>

无边框窗口的设置


设置WindowStyle="None":去掉标题栏和边框。


设置AllowsTransparency="True"+Background="Transparent":启用透明窗口。
只有启用透明,才能去除窗口的边框和背景色。


设置WindowStartupLocation属性用于控制窗口在启动时的位置。它决定了窗口在屏幕上的初始位置。
它有以下几个值:

描述
Manual 手动设置窗口的启动位置。窗口的位置可以通过设置Top和Left来控制。
CenterScreen 窗口启动时会自动居中在屏幕上。
CenterOwner 如果窗口有父窗口(Owner),则新窗口会在父窗口上居中。
WindowsDefaultLocation 系统默认的启动位置。

设置图片和音频文件路径

图片设置


WPF 中的 Image 控件用于显示图像。
您可以直接在 XAML 中通过 Source 属性来指定图片的路径,支持的路径类型包括相对路径、绝对路径以及资源路径。
如果您将图片作为嵌入资源添加到项目中(例如,存放在 Resources 文件夹中),您可以通过 pack:// URI 引用它:

  1. <Grid>
  2. <Image Source="/1.png" Height="50" Width="50" Margin="470,165,280,235" />
  3. <Image Source="pack://application:,,,/Resources/1.png" Height="50" Width="50" Margin="244,140,506,260" />
  4. </Grid>

播放嵌入资源中的音频


假设您将音频文件添加为项目资源并设置了 Build ActionResource,您可以通过 MediaElement 控件播放该音频:

  1. <Border Width="300" Height="30" Background="Red" >
  2. <MediaElement Source="./1.mp3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="300" Height="30" />
  3. </Border>

静态资源与动态资源


在 WPF 中,静态资源(Static Resources)是指在应用程序运行时可以直接引用的资源,如颜色、样式、模板、图像等。使用静态资源的好处在于,可以将常用的资源集中管理,避免重复定义,增强可维护性和可重用性。
首先需要在 XAML 中引入 System 命名空间,可以方便定义(doubleint…)这样的变量:

  1. xmlns:sys="clr-namespace:System;assembly=mscorlib"

静态资源


这里使用 sys:String变量作为静态资源,通过Button进行显示这个静态资源。

  1. <Window x:Class="WpfAppLearning.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfAppLearning"
  7. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  8. mc:Ignorable="d"
  9. WindowStyle="None" AllowsTransparency="True"
  10. Title="MainWindow" Height="450" Width="800">
  11. <Window.Resources>
  12. <sys:String x:Key="buttonContent" >There is Buttion Value</sys:String>
  13. </Window.Resources>
  14. <Grid>
  15. <Button Width="300" Height="30" Content="{StaticResource buttonContent}"></Button>
  16. </Grid>
  17. </Window>

动态资源


动态资源DynamicResource)的值可以在运行时进行更新。
因此,如果您需要在运行时动态更改这些变量的值,使用动态资源可能更合适。

  1. <Window x:Class="WpfAppLearning.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfAppLearning"
  7. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  8. mc:Ignorable="d"
  9. WindowStyle="None" AllowsTransparency="True"
  10. Title="MainWindow" Height="450" Width="800">
  11. <Window.Resources>
  12. <sys:String x:Key="buttonContent" >There is Buttion Value</sys:String>
  13. </Window.Resources>
  14. <Grid>
  15. <Button Width="300" Height="30" Content="{DynamicResource buttonContent}" Click="Button_Click" ></Button>
  16. </Grid>
  17. </Window>


注意这里将StaticResource改成了DynamicResource,在后台的Button_Click事件中每点击一次buttonContent对改资源进行动态加1

  1. private void Button_Click(object sender, RoutedEventArgs e)
  2. {
  3. // 在当前资源的基础上添加1
  4. var buttonWidth = Resources["buttonContent"].ToString();
  5. Resources["buttonContent"] += "1";
  6. }

静态资源定义类型资源


首先我们定义一个TestModel作为测试,然后在前端引用我们的命名空间,并定义其中的值。

  1. namespace WpfAppLearning
  2. {
  3. public class TestModel
  4. {
  5. public int Id { get; set; }
  6. public string Name { get; set; }
  7. }
  8. }
  1. xmlns:hmy="clr-namespace:WpfAppLearning"
  1. <Window x:Class="WpfAppLearning.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfAppLearning"
  7. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  8. xmlns:hmy="clr-namespace:WpfAppLearning"
  9. mc:Ignorable="d"
  10. WindowStyle="None" AllowsTransparency="True"
  11. Title="MainWindow" Height="450" Width="800">
  12. <Window.Resources>
  13. <sys:String x:Key="buttonContent" >There is Buttion Value</sys:String>
  14. <hmy:TestModel x:Key="MM" Id="10" Name="hmyz1z1"></hmy:TestModel>
  15. </Window.Resources>
  16. <Grid>
  17. <Button Width="300" Height="30" Content="{DynamicResource buttonContent}" Click="Button_Click" ></Button>
  18. <Label Width="300" Height="30" Content="{Binding Source={StaticResource MM},Path=Name}" Margin="250,175,250,245"></Label>
  19. </Grid>
  20. </Window>


Button中同样可以定义资源,如果使用的是StaticResource它将不会进行改变,如果是DynamicResource它将进行改变值。举例:

  1. <Button Width="300" Height="30" Content="{DynamicResource buttonContent}" Click="Button_Click" >
  2. <Button.Resources>
  3. <sys:String x:Key="buttonContent" >Change</sys:String>
  4. </Button.Resources>
  5. </Button>

  1. <Button Width="300" Height="30" Content="{StaticResource buttonContent}" Click="Button_Click" >
  2. <Button.Resources>
  3. <sys:String x:Key="buttonContent" >Change</sys:String>
  4. </Button.Resources>
  5. </Button>


资源的递归搜索:自身资源—>父级资源—>……—>窗口资源—>应用程序资源—>框架系统资源。

静态资源与动态资源区别


静态资源:程序编译时确定,程序编译后—>BAML(资源确定)。
动态资源:运行时可监听资源变化。

SolidColorBrush 的使用


SolidColorBrush 是一种用于填充颜色的画刷,常用于设置控件的背景、前景色等。
SolidColorBrush 是 WPF 中最基础的一种画刷类型,它允许你指定一个简单的颜色(例如,Red#FF0000 等)。

  1. <Window x:Class="WpfAppLearning.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfAppLearning"
  7. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  8. xmlns:hmy="clr-namespace:WpfAppLearning"
  9. mc:Ignorable="d"
  10. WindowStyle="None" AllowsTransparency="True"
  11. Title="MainWindow" Height="450" Width="800">
  12. <Window.Resources>
  13. <sys:String x:Key="buttonContent" >There is Buttion Value</sys:String>
  14. <hmy:TestModel x:Key="MM" Id="10" Name="hmyz1z1"></hmy:TestModel>
  15. <SolidColorBrush x:Key="MyBrush" Color="Green"/>
  16. </Window.Resources>
  17. <Grid>
  18. <Button Width="300" Height="30" Content="{StaticResource buttonContent}" Background="{StaticResource MyBrush}" Click="Button_Click" >
  19. <Button.Resources>
  20. <sys:String x:Key="buttonContent" >Change</sys:String>
  21. </Button.Resources>
  22. </Button>
  23. <Label Width="300" Height="30" Content="{Binding Source={StaticResource MM},Path=Name}" Margin="250,175,250,245"></Label>
  24. </Grid>
  25. </Window>

pack定义规则


在 WPF 中,pack URI 是一种用于引用应用程序资源(如图像、字体、文件等)和程序集资源的特殊路径格式。它是一种相对路径机制,使得应用程序资源可以在不同的环境和部署方式下无缝访问(例如,本地文件、嵌入式资源、外部程序集等)。pack 路径通常用于资源绑定、图像加载、样式等场景。
格式如下:

  1. pack://application:,,,/[程序集名称;]component/路径


如果要嵌入字体资源。

  1. <TextBlock FontFamily="pack://application:,,,/Fonts/#MyFont"/>

ResourceDictionary资源字典


ResourceDictionary 相当于一个资源集合,可以放在Window.Resources下面也可以放入一个单独的链接中。

  1. <ResourceDictionary>
  2. <sys:String x:Key="buttonContent" >There is Buttion Value</sys:String>
  3. <hmy:TestModel x:Key="MM" Id="10" Name="hmyz1z1"></hmy:TestModel>
  4. <SolidColorBrush x:Key="MyBrush" Color="Green"/>
  5. </ResourceDictionary>


定义到单独的GR.xaml中。

  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  4. xmlns:hmy="clr-namespace:WpfAppLearning">
  5. <sys:String x:Key="buttonContent" >There is Buttion Value</sys:String>
  6. <hmy:TestModel x:Key="MM" Id="10" Name="hmyz1z1"></hmy:TestModel>
  7. <SolidColorBrush x:Key="MyBrush" Color="Green"/>
  8. </ResourceDictionary>
  1. <Window.Resources>
  2. <ResourceDictionary Source="pack://application:,,,/GR.xaml"></ResourceDictionary>
  3. </Window.Resources>
  4. <Grid>
  5. <Button Width="300" Height="30" Content="{StaticResource buttonContent}" Background="{StaticResource MyBrush}" Click="Button_Click" >
  6. <Button.Resources>
  7. <sys:String x:Key="buttonContent" >Change</sys:String>
  8. </Button.Resources>
  9. </Button>
  10. <Label Width="300" Height="30" Content="{Binding Source={StaticResource MM},Path=Name}" Margin="250,175,250,245"></Label>
  11. </Grid>

使用内置的系统颜色


WPF 提供了一个名为 SystemColors 的类,它包含了一些常见的系统颜色,如窗口背景色、按钮面板色、选择背景色等。

  • SystemColors.ActiveBorder:活动边框颜色
  • SystemColors.ActiveCaption:活动窗口标题栏的颜色
  • SystemColors.AppWorkspace:应用程序工作区背景色
  • SystemColors.ButtonFace:按钮面板颜色
  • SystemColors.Highlight:选中项的背景颜色
  • SystemColors.HotTrack:鼠标悬停时的颜色
  • SystemColors.InactiveBorder:非活动边框颜色
  • SystemColors.Window:窗口背景颜色
  1. <Label Width="300" Height="30" Content="{Binding Source={StaticResource MM},Path=Name}" Background="{x:Static SystemColors.ActiveBorderBrush}" Margin="250,175,250,245"></Label>


欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739

评价

WPF DataGrid表头Checkbox 全选与全反选

WPF 在使用DataGrid展示数据的时候经常会使用到checkbox列,特别是id列 例如下面这种效果:WPF 要实现DataGrid checkbox全...

WPF基础学习笔记(二)

WPF基础学习笔记(二)[TOC] 设置控件样式在 WPF 中,Setter 是用来定义控件样式(Style)的一个重要元素。它允许你为控件...

WPF渲染模板

WPF渲染模板[TOC] 简介在WPF(Windows Presentation Foundation)中,渲染模板是一种强大的机制,允许开发者定义控件的外...

WPF CommunityToolkit.Mvvm初探

WPF CommunityToolkit.Mvvm初探[TOC] 什么是 CommunityToolkit.Mvvm?CommunityToolkit.Mvvm 是一个现代化的 MVVM 框架,...

WPF Mvvmlight初探

WPF Mvvmlight初探[TOC] 什么是 Mvvmlight?MVVM Light 是一个轻量级的 MVVM 框架,适用于 WPF、UWP、Xamarin 等多个平台...

WPF MvvmLight Messager学习

WPF MvvmLight Messager学习[TOC] NotificationMessage在 MVVM Light 中,NotificationMessage 是一种消息类型,用于在 Vi...

WPF Prism 框架:打造高效、可维护的 WPF 应用

WPF Prism 框架:打造高效、可维护的 WPF 应用[TOC] Prism 框架简介Prism 是一个用于构建松耦合、可维护且可测试的 XAML ...

WPF Prism 框架初始化

WPF Prism 框架初始化[TOC] 什么是 Prism Bootstrapper?Prism Bootstrapper 是一个抽象类,它定义了一个基本的启动序列,...

WPF Prism ViewModel的应用

WPF Prism ViewModel的应用[TOC] 在 WPF 开发中,Prism 是一个非常流行的框架,它基于 MVVM(Model-View-ViewModel)模式...

WPF Prism Dialog与Region

WPF Prism Dialog与Region[TOC] Prism框架中的Dialog子窗口处理在 WPF 应用程序开发中,对话框是一个常见的功能需求,无论...

WPF Prism 复合命令与模块化管理

WPF Prism 复合命令与模块化管理[TOC] Prism 中的 CompositeCommand 示例CompositeCommand 是 Prism 框架中用于组合多个子...
这一世以无限游戏为使命!
排名
2
文章
657
粉丝
44
评论
93
docker中Sware集群与service
尘叶心繁 : 想学呀!我教你呀
一个bug让程序员走上法庭 索赔金额达400亿日元
叼着奶瓶逛酒吧 : 所以说做程序员也要懂点法律知识
.net core 塑形资源
剑轩 : 收藏收藏
映射AutoMapper
剑轩 : 好是好,这个对效率影响大不大哇,效率高不高
ASP.NET Core 服务注册生命周期
剑轩 : http://www.tnblog.net/aojiancc2/article/details/167
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术