Slow and steady Silverlight (7)

Source: Internet
Author: User
Tags polyline xmlns silverlight

Steady Silverlight (7)-2.0 graphics Ellipse,line,path,polygon,polyline,rectangle

Introduced

Silverlight 2.0 Graphics:

Ellipse-Oval

Line-Wire

Path-a series of interconnected lines and curves

Polygon-Polygon, closed graph, beginning and end automatically connected

Polyline-closed graphics, a string of connected lines, starting point and end will not automatically connect

Rectangle-Rectangle

Online Demo

Http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html

Example

1, Ellipse.xaml

<UserControl x:Class="Silverlight20.Shape.Ellipse"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <StackPanel HorizontalAlignment="Left">

    <!--椭圆-->
    <!--
    Width - 椭圆的宽
    Height - 椭圆的高
    Stroke - 边框
    StrokeThickness - 边框尺寸
    Fill - 填充
    -->
    <Ellipse Stroke="Red" Fill="Yellow" StrokeThickness="6" Width="100" Height="50"></Ellipse>

  </StackPanel>
</UserControl>

2, Line.xaml

<UserControl x:Class="Silverlight20.Shape.Line"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <StackPanel HorizontalAlignment="Left">

    <!--线-->
    <!--
    X1 - 起点的 X 坐标
    Y1 - 起点的 Y 坐标
    X2 - 终点的 X 坐标
    Y2 - 终点的 Y 坐标
    注:
      Line无填充,也就是Line的Fill属性无效
      坐标以左上角为原点,原点右侧/下侧为正方向
    -->
    <Line X1="0" Y1="100" X2="200" Y2="300" Stroke="Black" StrokeThickness="6" />

  </StackPanel>
</UserControl>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.