Windows 8 Store Apps Learning (18) Drawing Shape, Path, Stroke, Brush

Source: Internet
Author: User
Tags polyline xmlns

Introduced

Re-imagine the Windows 8 Store Apps Drawing

Shape-Graphics

Path-Paths

Stroke-Strokes

Brush-Brushes

Example

1, show how to draw graphics

Drawing/shape.xaml

<page x:class= "XamlDemo.Drawing.Shape" xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation" x mlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local= "using:XamlDemo.Drawing" xmlns:d= "http://" schemas.microsoft.com/expression/blend/2008 "xmlns:mc=" http://schemas.openxmlformats.org/markup-compatibility/ 2006 "mc:ignorable=" D "> <grid background=" Transparent "> <stackpanel margin=" 0 0 0 "
    
            ; <!--draw graphics--> <!--draw a straight line--> <line x1= "0" y1= "0" x2= "3 "Y2=" stroke= "Blue" strokethickness= "3"/> <!--painted rectangular--> <rectang Le width= "height=" fill= "Red" stroke= "Yellow" strokethickness= "3"/> <!--draw a polyline (that is, multiple lines connected)--&
            Gt
       <polyline points= "10,100 50,10 100,100" stroke= "Green" strokethickness= "3"/> <!--draw Polygon-->     <polygon points= "50,50 100,50 300,100 200,100" 100,200 "fill=" yellow "Red" stroke= "6" strokethickness=  <!--painted oval--> <ellipse width= "height=" fill= "Orange" stroke= "Red" strokethickness= "6" /> <!--Stretch-stretching method (Windows.UI.Xaml.Media.Stretch Enum) Fill-fills the container, does not retain the aspect ratio none-does not do any processing, if the picture is larger than the container, then the extra portion is trimmed Unifor M-Scaling to the container (default) UniformToFill-fills the container, and retains the aspect ratio, the extra portion is trimmed--> <grid width= "2 "height=" horizontalalignment= "left" background= "Black" > <ellipse fill= "Orange" stroke= "Red" strokethickness= "6" stretch= "UniformToFill"/> </Grid> </StackPanel> </grid > </Page>

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.