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>