WEB开发网
开发学院图形图像Flash Silverlight(7) - 2.0图形之Ellipse, Line, Path,... 阅读

Silverlight(7) - 2.0图形之Ellipse, Line, Path, Polygon, Polyline, Rectangle

 2008-11-14 11:50:42 来源:WEB开发网   
核心提示: 4、Polygon.xaml<UserControl x:Class="Silverlight20.Shape.Polygon"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentatio

4、Polygon.xaml

<UserControl x:Class="Silverlight20.Shape.Polygon"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel HorizontalAlignment="Left">
    
    <!--多边形,闭合图形,起点与终点自动相连-->
    <!--
    Points - 构造路径所使用的点
      空格分隔点坐标,逗号分隔X轴和Y轴坐标
    -->
    <Polygon Points="0,0 100,0 300,100 200,100 100,200" Stroke="Red" StrokeThickness="6" Fill="Yellow" />
    
  </StackPanel>
</UserControl>

5、Polyline.xaml

<UserControl x:Class="Silverlight20.Shape.Polyline"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel HorizontalAlignment="Left">
  
    <!--非闭合图形,一串连接起来的线,起点与终点不会自动相连-->
    <!--
    Points - 构造路径所使用的点
      空格分隔点坐标,逗号分隔X轴和Y轴坐标
    -->
    <Polyline Points="0,0 100,0 300,100 200,100 100,200" Stroke="Red" StrokeThickness="6" Fill="Yellow" />
    
  </StackPanel>
</UserControl>

6、Rectangle.xaml

<UserControl x:Class="Silverlight20.Shape.Rectangle"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel HorizontalAlignment="Left">
    
    <!--矩形-->
    <!--
    RadiusX - 边角圆弧的X轴半径
    RadiusY - 边角圆弧的Y轴半径
    -->
    <Rectangle Width="200" Height="120" Stroke="Black" StrokeThickness="6" RadiusX="10" RadiusY="30" />
    
  </StackPanel>
</UserControl>

OK

上一页  1 2 3 

Tags:Silverlight 图形 Ellipse

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接