惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
B
Blog
The Register - Security
The Register - Security
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
F
Full Disclosure
The GitHub Blog
The GitHub Blog
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Blog — PlanetScale
Blog — PlanetScale
Jina AI
Jina AI
美团技术团队
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
D
DataBreaches.Net
Martin Fowler
Martin Fowler
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
The Cloudflare Blog
博客园 - 【当耐特】
U
Unit 42
月光博客
月光博客
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
博客园 - 聂微东
I
InfoQ
B
Blog RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
Cyberwarzone
Cyberwarzone
V
V2EX
S
Securelist
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Security @ Cisco Blogs
PCI Perspectives
PCI Perspectives
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Heimdal Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Tor Project blog

博客园 - pdfw

如何预编译ASP.Net程序 asp.net 输入框在chrome中无法关闭自动提示 sql server不能删除数据库,显示错误:正在使用 如何只更新datetime类型字段中的日期 SQL Server插入或修改数据是中文乱码的问题 怎么解决安装SqlServer2008总是提示Restart computer as failed 分页查询的SQL语句 如何使用Microsoft Enterprise Library里面的Log功能 【转】国外C#开源系统一览表 ,C# Open Source 【转】.NET试题总结二 【转】.NET试题总结一 窗口之间传递消息的一个方法 Dataset Designer在VS 2008里面不工作的解决办法 Flex中查找XML节点 - pdfw - 博客园 c#如何监视文件或者文件夹的变化 - pdfw - 博客园 如何在非英文环境中正确显示数字 SQL Server Express中连接字符串的问题 wpf制作毛玻璃效果按钮的代码 如何跨线程访问UI控件
WPF中用于Path的Geometry Mini-Language
pdfw · 2009-09-07 · via 博客园 - pdfw

我们可以用下面的xaml代码画一个三角形

<Path Stroke="Blue">
    
<Path.Data>
        
<PathGeometry>
            
<PathFigure IsClosed="True" StartPoint="10,100">
                
<LineSegment Point="100,100" />
                
<LineSegment Point="100,50" />
            
</PathFigure>
        
</PathGeometry>
    
</Path.Data>
</Path>

下面的xaml代码会画一个和上面代码相同的三角形

<Path Stroke="Blue" Data="M 10,100 L 100,100 L 100,50 Z"/>

第二段代码里面Data属性的值就是用Mini-Language定义的。下面是Geometry Mini-Language的命令说明
Command           Description
F                  value Sets the Geometry.FillRule property. Use 0 for EvenOdd, or 1 for NonZero.
                   This command must appear at the beginning of the string (if you decide to use it).
M x,y               Creates a new PathFigure for the geometry and sets its start point. This
                   command must be used before any other commands except F. However, you
                   can also use it during your drawing sequence to move the origin of your
                   coordinate system. (The M stands for move.)
L x,y                Creates a LineSegment to the specified point.
H x                 Creates a horizontal LineSegment using the specified X value and keeping the
                   Y value constant.
V y                 Creates a vertical LineSegment using the specified Y value and keeping the
                   X value constant.
A radiusX, radiusY     Creates an ArcSegment to the indicated point. You specify the radii of the
degrees isLargeArc,    ellipse that describes the arc, the number of degrees the arc is rotated, and
isClockwise x,y        Boolean flags that set the IsLargeArc and SweepDirection properties
                   described earlier.
C x1,y1 x2,y2 x,y      Creates a BezierSegment to the indicated point, using control points at
                   (x1, y1) and (x2, y2).
Q x1, y1 x,y          Creates a QuadraticBezierSegment to the indicated point, with one control
                   point at (x1, y1).
S x2,y2 x,y           Creates a smooth BezierSegment by using the second control point from the
                   previous BezierSegment as the first control point in the new BezierSegment.
Z                  Ends the current PathFigure and sets IsClosed to true. You don’t need to use
                   this command if you don’t want to set IsClosed to true—instead, simply use M
                   if you want to start a new PathFigure or end the string.