![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
WPF学习笔记
文章平均质量分 66
本专栏会分享我在学习WPF技术过程中的笔记
YaruCode
这个作者很懒,什么都没留下…
展开
-
WPF中MVMM开发模式实现数据验证
WPF中基于MVVM模式实现的数据验证原创 2022-09-08 07:41:46 · 486 阅读 · 0 评论 -
WPF的TextBlock控件
WPF的TextBlock控件XMAL代码如下:<Window x:Class="MyControl.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/...原创 2020-04-02 11:37:24 · 598 阅读 · 0 评论 -
WPF用LiveChart来画饼图
WPF用LiveChart来画饼图效果如下:xmal界面代码:<Window x:Class="饼图.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006...原创 2020-03-31 13:29:42 · 6733 阅读 · 0 评论 -
WPF使用鼠标滚轮和Ctrl实现缩放和放大功能
WPF使用鼠标滚轮和Ctrl实现缩放和放大功能效果如下:界面代码如下:<Window x:Class="缩放.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2...原创 2020-03-11 11:32:50 · 3912 阅读 · 0 评论 -
WPF之碰撞检测--HitTesting
WPF之碰撞检测–HitTesting效果如下:界面代码如下:<Window x:Class="Hit_Testing.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/w...原创 2020-03-03 11:01:02 · 1330 阅读 · 0 评论 -
WPF路径绘图之CombinedGeometry
WPF路径绘图之CombinedGeometry效果如下:XMAL代码如下:<Window x:Class="Graphic_00.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft...原创 2020-02-29 15:12:26 · 850 阅读 · 2 评论 -
WPF学习笔记之路径绘图
WPF学习笔记之路径绘图效果如下:界面代码如下:<Window x:Class="Graphic_00.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200...原创 2020-02-29 14:41:49 · 235 阅读 · 0 评论 -
WPF使用Live Chart之动态更新数据
WPF使用Live Chart之动态更新数据效果如下:前台代码:<Window x:Class="Chapter3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/win...原创 2020-02-24 16:18:43 · 8361 阅读 · 4 评论 -
WPF制作好看的侧边栏控件
WPF制作好看的侧边栏控件界面代码如下:<Window x:Class="侧边停靠按钮.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...原创 2020-02-20 21:48:56 · 2439 阅读 · 0 评论 -
WPF绘图通过矩阵运算实现移动
WPF绘图通过矩阵运算实现移动 前台代码:<Window x:Class="Chapter3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"...原创 2020-02-19 23:27:20 · 298 阅读 · 0 评论 -
WPF矩阵计算示例
WPF矩阵计算示例界面代码如下:<Window x:Class="Chapter3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...原创 2020-02-19 20:09:17 · 536 阅读 · 0 评论 -
WPF绘图之旋转
WPF绘图之旋转原创 2020-02-16 21:57:29 · 293 阅读 · 0 评论 -
WPF图形学习笔记之Line
WPF图形学习笔记之LineWPF_Graphics之LineLine创建一个Line <Canvas> <Line X1="0" Y1="0" X2="100" Y2="100" Stroke="Black" StrokeThickness="1"/> &l...原创 2020-02-16 11:21:16 · 7348 阅读 · 0 评论 -
WPF自定义坐标系并且绘制
WPF自定义坐标系并且绘制界面代码如下:<Window x:Class="Line.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...原创 2020-02-16 11:11:03 · 3040 阅读 · 0 评论 -
WPF制作跟着鼠标跑的小球
WPF制作跟着鼠标跑的小球界面代码:<Window x:Class="MouseDetectBall.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/x...原创 2020-02-14 16:19:03 · 388 阅读 · 2 评论 -
WPF数据绑定之UpdateSourceTrigger
WPF数据绑定之UpdateSourceTrigger在XMAL中进行数据帮的时候,可以进行对Binding的UpdateSourceTrigger属性赋值来确定什么时候来更新数据,它的类型是UpdateSourceTrigger的枚举,可取值位PropertyChanged(属性改变时更新,更新频率会很高),LostFocus(失去焦点),Explicit和Default(默认,这个属性视具体...原创 2020-02-14 14:30:40 · 542 阅读 · 0 评论 -
WPF之数据绑定
WPF之数据绑定界面是很简单的两个Label和两个TextBox组成,用来显示一个Student类的两个属性。界面如下:<Window x:Class="数据模板.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://sc...原创 2020-02-14 14:17:29 · 293 阅读 · 0 评论 -
WPF学习TreeView和ValueConverter
WPF学习TreeView和ValueConverter界面代码如下:<Window x:Class="WPF_TreeView.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.co...原创 2020-02-12 14:09:57 · 257 阅读 · 0 评论 -
WPF布局示例1
WPF布局示例1<Window x:Class="WPF_basic0.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xml...原创 2020-02-10 14:22:59 · 256 阅读 · 1 评论 -
WPF布局示例之动态内容
WPF布局示例之动态内容<Window x:Class="布局.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d...原创 2020-02-09 13:11:02 · 402 阅读 · 0 评论 -
WPF布局示例
WPF布局示例0<Window x:Class="布局.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="ht...原创 2020-02-09 12:45:48 · 368 阅读 · 0 评论 -
WPF学习笔记之布局0
WPF学习笔记之布局0WPF中布局包括两个阶段:测量和排列wpf中所有的布局容器都都是派生自System.Windows.Controls.Panel抽象类面板,包括三个共有属性名称书名Background设置面板的背景颜色Children该属性是在面板中存储条目集合IsItemHost该属性是一个布尔值通俗来讲记是判断改容器是不是一个宿主容器使用...原创 2020-02-06 14:17:46 · 257 阅读 · 0 评论 -
WPF数据模板之Item Template
WPF数据模板之Item Template本项目首先定义了一个由一个TextBlock、一个Image、一个Button和一个CheckBox组成的模板,并且把这个模板应用到了ListBox的Item属性中。XMAL代码如下:<Window x:Class="Image.MainWindow" xmlns="http://schemas.microsoft.com/wi...原创 2020-02-05 21:44:54 · 2928 阅读 · 0 评论 -
WPF数据模板之DataGrid
WPF数据模板之DataGrid<Window x:Class="数据模板.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x...原创 2020-02-05 17:36:03 · 1992 阅读 · 0 评论 -
WPF中触发器的学习
WPF中触发器的学习WPF中的触发器可以用来设置控件的状态变化的时候发生的一些事情。本案例说明的时先定义一个资源,类型是按钮类型,添加一个出发的事件是鼠标悬停时字体大小变成30,字体变成蓝色<Window x:Class="notes00.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/pr...原创 2020-02-04 15:49:01 · 298 阅读 · 0 评论