wpf 向量计算
xaml <Grid> <!-- 坦克图片,RenderTransformOrigin 设置中心点为 .5 .5 --> <Rectangle x:Name="TankRectangle" Width="240" Height="120" RenderTran…
|
129
|
|
165 字
|
8 分钟
wpf 水波纹按钮
模板 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wa…
|
275
|
|
125 字
|
6 分钟
wpf 状态切换
调用 # 调用 // 切换状态,指定模拟的状态时使用 VisualStateManager.GoToState, 现在指定了控件的状态,使用 VisualStateManager.GoToElementState VisualStateManager.GoToElementState(this.ColorBorder, name, true); x…
|
332
|
|
110 字
|
6 分钟
wpf 右下角提示弹窗口
<Window x:Class="WpfDemoApp.PromptPopupBoxCtrls.PopupBoxWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://s…
|
272
|
|
59 字
|
3 分钟
贝塞尔曲线公式
计算公式 二次曲线 三次曲线 https://www.bilibili.com/video/BV16v4y1Q7PD https://juejin.cn/post/7082701281969569829
|
304
|
|
26 字
|
几秒读完
.net 断言库
GuardClauses Ardalis.GuardClauses https://www.nuget.org/packages/Ardalis.GuardClauses https://github.com/ardalis/guardclauses Guard.Against.Null → 若输入为 null,则抛出异常 Guard.Agai…
|
241
|
|
85 字
|
3 分钟
WPF / Avalonia / CSS Matrix 矩阵
学习心得 名称 值 值 X坐标 1 0 Y坐标 0 1 偏移量 0 0 相当于 (0, 0), X (1, 0), Y (0, 1) 三个点决定了一个矩形 通过计算得到新的 X, Y , 然后再通过平移得到最终的坐标 平移 最简单, 修改平移值即可 名称 值 值 X坐标 1 0 Y坐标 0 1 偏移量 横向平移 纵向平移 缩放 在 x 轴与 y 轴…
|
625
|
|
492 字
|
4 分钟
.net 支持插件系统的 类库
https://github.com/natemcmaster/DotNetCorePlugins
|
219
|
|
5 字
|
几秒读完
.net 程序集扫描类 Scrutor
https://github.com/khellang/Scrutor 可扫描 实现了一个装饰器 扫描 var collection = new ServiceCollection(); collection.Scan(scan => scan // 从 ITransientService 接口所在的程序集开始扫描 .FromAssembly…
|
196
|
|
79 字
|
3 分钟
AutoFixture 简单介绍
- 在单元测试中自动生成随机的测试数据 Fixture fixture = new(); var items = fixture.Build<ListItem>() .With(it => it.Idx, Random.Shared.Next()) // 配置为所有实例都使用该值 .Without(it => it.Desc…
|
415
|
|
33 字
|
1 分钟内