随笔分类 -  WPF

wpf 入门教程
摘要:我们通常说的模板是用来参照的,同样在WPF中,模板是用来作为制作控件的参照。 一、认识模板 1.1WPF菜鸟看模板 前面的记录有提过,控件主要是算法和数据的载体。控件的算法主要体现在可以激发的事件、可以调用的方法、能进行的操作等方面;控件的数据体现为:控件能展示哪些数据。上面两方面终决定了控件,在以 阅读全文
posted @ 2021-07-17 08:43 MaxBruce 阅读(1077) 评论(0) 推荐(0)
摘要:<Style TargetType="RadioButton" x:Key="nav"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="RadioButton"> <Border x:Name="b" 阅读全文
posted @ 2021-07-16 22:50 MaxBruce 阅读(147) 评论(0) 推荐(0)
摘要:WPF使用Path来画圆, 在 WPF 中可以使用 Path (路径) 来画圆,而 Path 支持两种写法:xaml 代码格式、标记格式,这里介绍的是标记格式: 例子: <Path Data="M 300,300 A 100,100 0 1 1 300,299 Z" Stroke="Black" S 阅读全文
posted @ 2021-07-15 22:27 MaxBruce 阅读(5918) 评论(0) 推荐(4)
摘要:<Button x:Name="LearnMore" Grid.Row="6" HorizontalAlignment="Left" VerticalAlignment="Top" Click="go_webSite" > <Button.Template> <ControlTemplate Tar 阅读全文
posted @ 2021-07-14 18:36 MaxBruce 阅读(458) 评论(0) 推荐(1)
摘要:网站: https://github.com/vasanthmes/WPF-Dashboard-UI-Material-Design-Concept theme <Application x:Class="MobileAppUsageDashboard.App" xmlns="http://sche 阅读全文
posted @ 2021-07-14 07:26 MaxBruce 阅读(723) 评论(0) 推荐(0)
摘要:wpf 的动画: https://www.cnblogs.com/TianFang/p/4050845.html 阅读全文
posted @ 2021-07-12 07:22 MaxBruce 阅读(72) 评论(0) 推荐(0)
摘要://参考网址: https://www.cnblogs.com/zh7791/p/12617961.html 本文主要介绍LiveChart.WPF 中的图表的使用方法 类: 数据绑定, 数据显示样式等。 导入LiveChart.Wpf NuGet搜索LiveChart包, 安装LiveChart. 阅读全文
posted @ 2021-07-11 21:36 MaxBruce 阅读(5307) 评论(0) 推荐(1)
摘要: 阅读全文
posted @ 2021-07-11 16:16 MaxBruce 阅读(70) 评论(0) 推荐(0)
摘要:1. 移动指令:Move Command(M):M 起始点 或者:m 起始点比如:M 100,240或m 100,240使用大写M时,表示绝对值; 使用小写m时; 表示相对于前一点的值,如果前一点没有指定,则使用(0,0)。 2. 绘制指令(Draw Command):我们可以绘制以下形状:(1) 阅读全文
posted @ 2021-07-10 13:41 MaxBruce 阅读(695) 评论(0) 推荐(0)
摘要:WPF中Converter的用于对数据的转换。以下实例将实现将数据中的性别属性的转换(0:男,1:女)。 1、创建SexConverter.cs类,并实现IValueConverter接口 public class SexConverter : IValueConverter{ public obj 阅读全文
posted @ 2021-07-10 09:53 MaxBruce 阅读(416) 评论(0) 推荐(0)
摘要:在WPF的DrawingContext对象中,提供了基本的绘制椭圆和矩形的API:DrawEllipse和DrawRectangle。但是,这些是远远不够用的,我们在日常应用中,更多的是使用DrawGeometry函数,它可以绘制更多复杂的几何图形,并且提供了许多强大而易用的函数,在大多数场景下,甚 阅读全文
posted @ 2021-07-10 09:09 MaxBruce 阅读(543) 评论(0) 推荐(0)
摘要:网站:https://www.jianshu.com/p/52dc85668d00 也算记录自己的学习篇=。= 适合入门看 这里简单介绍下MethodInfo和他基本的几个方法 简介 MethodInfo就是通过反射指定类获取到的 属性并提供对方法函数数据的访问。 1.如何获取? Type.GetM 阅读全文
posted @ 2021-07-10 07:24 MaxBruce 阅读(1662) 评论(0) 推荐(0)
摘要:源码链接:https://github.com/DuelWithSelf/WPFEffects 参考:https://www.cnblogs.com/duel/p/duel_clock.html 更新一: 功能导览模块新增Binding用法示例。 更新二:仪表盘效果实现。 Binding用法与Lis 阅读全文
posted @ 2021-06-26 13:50 MaxBruce 阅读(933) 评论(0) 推荐(0)
摘要:0、小叙闲言# 除了仪表盘控件比较常用外,还有图表也经常使用,同样网上也有非常强大的图表控件,有收费的(DEVexpress),也有免费的。但我们平时在使用时,只想简单地绘一个图,控件库里面的许多功能我们都用不到,没必要使用那么功能丰富的控件,以提高程序运行的效率和减小程序的占用空间。同时,我们自己 阅读全文
posted @ 2021-06-20 11:20 MaxBruce 阅读(644) 评论(0) 推荐(0)
摘要:路由事件 路由事件的事件拥有者和事件响应者之间没有直接显示的订阅关系,事件的拥有者只负责激发事件,事件将由谁响应它并不知道。事件的响应者则安装事件侦听器,针对某类事件进行侦听,当有此类事件传递至此事件响应者就使用此事件处理器来相应事件并决定事件是否继续传递。 WPF系统中大多数事件都是可路由事件。路 阅读全文
posted @ 2021-06-20 09:51 MaxBruce 阅读(164) 评论(0) 推荐(0)
摘要:XMl 代码 <UserControl x:Class="Xiaowei.Controls.PermissionBlock" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schem 阅读全文
posted @ 2021-06-18 15:52 MaxBruce 阅读(515) 评论(0) 推荐(0)
摘要:public class Person { public static readonly RoutedEvent NameChangedEvent = EventManager.RegisterRoutedEvent("NameChanged", RoutingStrategy.Bubble,typ 阅读全文
posted @ 2021-06-06 19:29 MaxBruce 阅读(42) 评论(0) 推荐(0)
摘要:public class ReportTimeEventArgs:RoutedEventArgs { public ReportTimeEventArgs(RoutedEvent routedEvent, object source) : base(routedEvent, source) { } 阅读全文
posted @ 2021-06-06 19:16 MaxBruce 阅读(46) 评论(0) 推荐(0)
摘要:<Window x:Class="WPF.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xa 阅读全文
posted @ 2021-06-05 14:32 MaxBruce 阅读(249) 评论(0) 推荐(0)
摘要:最近弄得一个小软件,需要用到富文本编辑器,richtextbox,一开始以为是和文本框一样的用法,但是实践起来碰壁之后才知道并不简单。 richtextbox 类似于Word,是一个可编辑的控件。结构图(来自网络) 我的主要用途是用来支持一个基于C#的考试系统,由于考试科目涉及到图片以及还有复杂的数 阅读全文
posted @ 2021-05-18 18:22 MaxBruce 阅读(2124) 评论(0) 推荐(1)