随笔 - 46,  文章 - 0,  评论 - 2,  阅读 - 80889

随笔分类 -  WPF

WPF 将字符串按固定位数间隔展示
摘要:使用转换器,将字符串值做处理: using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Windows 阅读全文
posted @ 2023-09-25 14:56 潇潇烟雨 阅读(34) 评论(0) 推荐(0) 编辑
WPF TextBlock显示固定长度字符串
摘要:页面中TextBlock控件内容 <TextBlock x:Name="name" HorizontalAlignment="Left" Text="{Binding Name,Converter={StaticResource StringMaxLenConverter},ConverterPar 阅读全文
posted @ 2023-09-19 18:26 潇潇烟雨 阅读(114) 评论(0) 推荐(0) 编辑
WPF 添加图片,可移动图片位置
摘要:1、创建一个.xaml文件,页面布局: <UserControl x:Class="Module.ScreentView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schema 阅读全文
posted @ 2023-09-18 09:39 潇潇烟雨 阅读(334) 评论(0) 推荐(0) 编辑
WPF 获取键盘点击值、组合键方式
摘要:在xmal.cs文件中实现,或者重写OnPreviewKeyDown()方法: string codeValue = ""; int InputCount = 0; protected override void OnPreviewKeyDown(KeyEventArgs e) { int keyV 阅读全文
posted @ 2023-09-12 11:58 潇潇烟雨 阅读(589) 评论(0) 推荐(0) 编辑
WPF DataGrid控件扩展
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Controls; using System.Windows.Controls.Pri 阅读全文
posted @ 2023-09-11 09:24 潇潇烟雨 阅读(112) 评论(0) 推荐(0) 编辑
WPF 控件Helper类--根据控件宽度自适应字体大小
摘要:WPF控件帮助类,实现字体自适应,图片上传解码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Wind 阅读全文
posted @ 2023-09-11 09:18 潇潇烟雨 阅读(279) 评论(0) 推荐(0) 编辑
WPF 使用矩形实现加载Loading动画的方式
摘要:首先,创建一个用户控件实现动画Loading的功能: <UserControl x:Class="K.Controls.Controls.LoadingControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 阅读全文
posted @ 2023-09-08 19:08 潇潇烟雨 阅读(333) 评论(0) 推荐(0) 编辑
WPF 使用Image实现动画旋转Loading
摘要:首先需要有一个Loading的图片,(白色背景,白色小圆圈,所以显示看不到): 创建一个用户控件,实现动画的功能: <UserControl x:Class="K.Controls.Controls.LoadingImage" xmlns="http://schemas.microsoft.com/ 阅读全文
posted @ 2023-09-08 18:56 潇潇烟雨 阅读(460) 评论(0) 推荐(0) 编辑
C#、WPF的XAML中特殊字符的转义代码
摘要:xmal文件中,写入对应转义符可以实现对应功能 字符 转义字符 & & > > < < " " ’ ' { {}{ 回车 &#x000D;或者&#13; 换行 &#x000A;或者&#10; Tab &#x0009;或者&#9; 空格 &#x0020;或者&#32; 如: <Border Corne 阅读全文
posted @ 2023-08-31 17:58 潇潇烟雨 阅读(64) 评论(0) 推荐(0) 编辑


< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示