wpf 导航栏
制作了一个 ListBox 的子类 xaml # 选中圆的边缘可以使用 blend 制作 ,见最后的链接中的视频演示 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="htt…
|
537
|
|
254 字
|
12 分钟
wpf 一些文字特效
文字的宽度 # 自定义一个 Shape 子类 GeometryTextShape # 然后内容使用 formattedText.BuildGeometry 计算出 Geometry # 然后设置 GeometryTextShape ,StrokeThickness 值 ,这样就可以无级设置宽度了 public class GeometryTextS…
|
502
|
|
176 字
|
7 分钟
wpf Triggers 例子
xaml 鼠标移上、移出变色及缩放,工作中呼吸灯效果 <Grid> <!-- 为了方便例子中只用了一个 --> <Ellipse x:Name="WifiEllipse1" Width="180" Height="{Binding RelativeSource={Rel…
|
490
|
|
169 字
|
8 分钟
wpf 打字机效果
cs // 打字机效果 var textBlock = this.SloganTextBlock; var textBlockText = textBlock.Text; textBlock.Text = string.Empty; // 先清空输出的内容 var frams = new StringAnimationUsingKeyFrames …
|
444
|
|
134 字
|
7 分钟
wpf Geometry 一些辅助函数
// 使用 xaml 资源 // <FontFamily x:Key="ZiYuFangFuhHeiTi">../Resource/Fonts/#字语坊腹黑体</FontFamily> // 嵌入字体,编译为 Resource, 名称前有 # // var fontFamily = application…
|
331
|
|
96 字
|
5 分钟
使用ML.NET训练图像分类模型例子
https://www.cnblogs.com/Can-daydayup/p/18302180
|
437
|
|
8 字
|
几秒读完
LINQ 速查
常用 LINQ 表达式 标准查询运算符 说明 返回类型 立即执行 延迟流式处理 延迟非流式处理 示例 Where 筛选满足条件的元素 IEnumerable<T> ✅ list.Where(x => x.Age > 20) Select 投影每个元素 IEnumerable<T> ✅ list.Select(x …
|
432
|
|
676 字
|
3 分钟
.net webapi Dockerfile 样本
# 请参阅 https://aka.ms/customizecontainer 以了解如何自定义调试容器,以及 Visual Studio 如何使用此 Dockerfile 生成映像以更快地进行调试。 # 在项目目录下编译,因为引用了其它项目,所以指定了上下文目录为解决方案目录 .. # docker build -t generalapi.api…
|
479
|
|
46 字
|
3 分钟
wpf 辉光卡片
看到有人用 Avalonia 实现,这里使用 wpf 实现 xaml <Grid> <Grid Width="150" Height="250"> <Grid.Resources> <GradientStopCollection x:Key="Gradien…
|
318
|
|
104 字
|
5 分钟
wpf 自定义面板布局
这里实现了一个横向的简易版 StackPanel // 1. 计算需要的尺寸 protected override Size MeasureOverride(Size availableSize) { var resultSize = new Size(); // 需要的总尺寸 var currentLineSize = new Size(); /…
|
152
|
|
131 字
|
6 分钟