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

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - 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.