稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape

时间:2022-06-10 12:15:38
[索引页]
[源码下载]


稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape


作者: webabcd


介绍
Silverlight 2.0 图形:基类System.Windows.Shapes.Shape(Ellipse, Line, Path, Polygon, Polyline, Rectangle都继承自抽象类System.Windows.Shapes.Shape)。
    Fill - 填充(System.Windows.Media.Brush类型)
    Stroke - 笔触(System.Windows.Media.Brush类型)
    StrokeThickness - 笔触尺寸
    Stretch - 拉伸值 [System.Windows.Media.Stretch 枚举]
    StrokeDashArray - 虚线和间隙的值的集合 [System.Windows.Media.Stretch 枚举]
    StrokeDashCap - 虚线两端(线帽)的类型 [System.Windows.Media.PenLineCap 枚举]
    StrokeStartLineCap - 虚线起始端(线帽)的类型 [System.Windows.Media.PenLineCap 枚举]
    StrokeEndLineCap - 虚线终结端(线帽)的类型 [System.Windows.Media.PenLineCap 枚举]
    StrokeDashOffset - 虚线的起始位置。从虚线的起始端的 StrokeDashOffset 距离处开始描绘虚线
    StrokeLineJoin - 图形连接点处的连接类型 [System.Windows.Media.PenLineJoin 枚举]
    StrokeMiterLimit - 斜接长度 与 StrokeThickness/2 的比值。默认值 10,最小值 1


在线DEMO
http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html


示例
Shape.xaml
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape< UserControl  x:Class ="Silverlight20.Shape.Shape"
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape    xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape    xmlns:x
="http://schemas.microsoft.com/winfx/2006/xaml" >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape    
< StackPanel  HorizontalAlignment ="Left" >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
< Grid  Margin ="10"  HorizontalAlignment ="Left" >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            Fill - 填充(System.Windows.Media.Brush类型)
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            Stroke - 笔划(边框)(System.Windows.Media.Brush类型)
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeThickness - 笔划(边框)尺寸
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Rectangle  Width ="200"  Height ="50"  Fill ="Red"  Stroke ="Yellow"  StrokeThickness ="3"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
</ Grid >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
< Grid  Width ="200"  Height ="200"  Margin ="10"  HorizontalAlignment ="Left"  ShowGridLines ="True" >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Grid.RowDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="100"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="100"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
</ Grid.RowDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Grid.ColumnDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="100"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="100"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
</ Grid.ColumnDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!-- Stretch属性 - 拉伸值 [System.Windows.Media.Stretch 枚举] -->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            Stretch.None - 不做处理
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                不做任何拉伸处理,填充内容保持原始大小
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Rectangle  Grid.Row ="0"  Grid.Column ="0"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Width
="80"  Height ="40"  Fill ="Red"  Stroke ="Yellow"  StrokeThickness ="6"
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Stretch
="None"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            Stretch.Fill - 充满
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                调整填充内容,以充满整个容器,填充内容比例变为容器比例。默认值            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Rectangle  Grid.Row ="0"  Grid.Column ="1"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Width
="180"  Height ="40"  Fill ="Red"  Stroke ="Yellow"  StrokeThickness ="6"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Stretch
="Fill"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            Stretch.Uniform - 等比适应
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                调整填充内容,以适合容器尺寸,填充内容会做等比例调整
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                如果填充内容与容器比例不一样,那么填充内容调整的结果为:
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                使得填充内容的宽与容器的宽相等,或者 填充内容的高与容器的高相等。填充内容会被完整显示
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Rectangle  Grid.Row ="1"  Grid.Column ="0"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Width
="80"  Height ="40"  Fill ="Red"  Stroke ="Yellow"  StrokeThickness ="6"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Stretch
="Uniform"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            Stretch.UniformToFill - 等比充满
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                调整填充内容,以适合容器尺寸,填充内容会做等比例调整
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                如果填充内容与容器比例不一样,那么填充内容调整的结果为:
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                使得填充内容的宽与容器的宽相等,并且 填充内容的高与容器的高相等。填充内容会被做相应的剪裁
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Rectangle  Grid.Row ="1"  Grid.Column ="1"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Width
="80"  Height ="40"  Fill ="Red"  Stroke ="Yellow"  StrokeThickness ="6"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     Stretch
="UniformToFill"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
</ Grid >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
< Grid  Margin ="10"  HorizontalAlignment ="Left" >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Grid.RowDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="20"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="20"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="20"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="20"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="20"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="20"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< RowDefinition  Height ="20"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
</ Grid.RowDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeDashArray - 虚线和间隙的值的集合 [System.Windows.Media.Stretch 枚举]
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                奇数项为虚线长度;偶数项为间隙长度;如果只有一个值,则虚线长度和间隙长度都为该值
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="0"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Red"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                     
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeDashCap - 虚线两端(线帽)的类型 [System.Windows.Media.PenLineCap 枚举]
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                PenLineCap.Flat - 无。默认值
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                PenLineCap.Round - 直径等于 StrokeThickness
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                PenLineCap.Square - 高度等于 StrokeThickness 并且 宽度等于 StrokeThickness/2
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                PenLineCap.Triangle - 底边长等于 StrokeThickness 的等腰直角三角形
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="1"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Red"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Flat"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="2"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Red"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Round"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="2"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Black"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Flat"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="3"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Red"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Square"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="3"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Black"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Flat"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="4"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Red"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Triangle"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="4"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Black"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Flat"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeStartLineCap - 虚线起始端(线帽)的类型 [System.Windows.Media.PenLineCap 枚举]
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeEndLineCap - 虚线终结端(线帽)的类型 [System.Windows.Media.PenLineCap 枚举]
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="5"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Red"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeStartLineCap ="Square"  StrokeEndLineCap ="Triangle"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="5"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Black"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashCap ="Flat"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeDashOffset - 虚线的起始位置。从虚线的起始端的 StrokeDashOffset 距离处开始描绘虚线
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Row ="6"  X1 ="0"  Y1 ="0"  X2 ="400"  Y2 ="0"  Stroke ="Red"  StrokeThickness ="10"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                  StrokeDashArray
="2,4,6"  StrokeDashOffset ="1"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
</ Grid >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
< Grid  Margin ="10"  HorizontalAlignment ="Left"  ShowGridLines ="True" >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Grid.ColumnDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="120"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="120"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="120"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
</ Grid.ColumnDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!-- StrokeLineJoin属性 - 图形连接点处的连接类型 [System.Windows.Media.PenLineJoin 枚举] -->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeLineJoin.Bevel - 线形连接
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Polyline  Grid.Column ="0"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      Points
="10,100 50,10 100,100"  Stroke ="Red"  StrokeThickness ="20"  HorizontalAlignment ="Center"
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      StrokeLineJoin
="Bevel"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeLineJoin.Miter - 角形连接。默认值
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Polyline  Grid.Column ="1"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      Points
="10,100 50,10 100,100"  Stroke ="Red"  StrokeThickness ="20"  HorizontalAlignment ="Center"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      StrokeLineJoin
="Miter"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!--
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            StrokeLineJoin.Round - 弧形连接
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
-->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Polyline  Grid.Column ="2"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      Points
="10,100 50,10 100,100"  Stroke ="Red"  StrokeThickness ="20"   HorizontalAlignment ="Center"
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      StrokeLineJoin
="Round"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
</ Grid >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
< Grid  Margin ="10"  HorizontalAlignment ="Left"   ShowGridLines ="True" >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Grid.ColumnDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="120"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="120"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                
< ColumnDefinition  Width ="120"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
</ Grid.ColumnDefinitions >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
<!-- StrokeMiterLimit属性 - 斜接长度(蓝色线部分)与 StrokeThickness/2 的比值。默认值 10,最小值 1 -->
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Polyline  Grid.Column ="0"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      Points
="0,100 50,10 100,100"  Stroke ="Red"  StrokeThickness ="20"
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      StrokeMiterLimit
="1"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="0"  X1 ="0"  Y1 ="100"  X2 ="50"  Y2 ="10"  Stroke ="Yellow"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="0"  X1 ="50"  Y1 ="10"  X2 ="100"  Y2 ="100"  Stroke ="Yellow"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="0"  X1 ="50"  Y1 ="10"  X2 ="50"  Y2 ="0"  Stroke ="Blue"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Polyline  Grid.Column ="1"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      Points
="0,100 50,10 100,100"  Stroke ="Red"  StrokeThickness ="20"
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      StrokeMiterLimit
="2.0"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="1"  X1 ="0"  Y1 ="100"  X2 ="50"  Y2 ="10"  Stroke ="Yellow"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="1"  X1 ="50"  Y1 ="10"  X2 ="100"  Y2 ="100"  Stroke ="Yellow"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="1"  X1 ="50"  Y1 ="10"  X2 ="50"  Y2 ="-10"  Stroke ="Blue"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Polyline  Grid.Column ="2"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      Points
="0,100 50,10 100,100"  Stroke ="Red"  StrokeThickness ="20"  
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape                      
/>
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="2"  X1 ="0"  Y1 ="100"  X2 ="50"  Y2 ="10"  Stroke ="Yellow"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="2"  X1 ="50"  Y1 ="10"  X2 ="100"  Y2 ="100"  Stroke ="Yellow"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
< Line  Grid.Column ="2"  X1 ="50"  Y1 ="10"  X2 ="50"  Y2 ="-10"  Stroke ="Blue"   />
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape            
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape        
</ Grid >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape    
</ StackPanel >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape
</ UserControl >
稳扎稳打Silverlight(8) - 2.0图形之基类System.Windows.Shapes.Shape


OK
[源码下载]