WPF notes (1.10 Drawing)--hello,wpf!

Source: Internet
Author: User

Original: WPF notes (1.10 Drawing)--hello,wpf!

The code syntax in the book is obsolete and is rewritten as follows (test pass):

        <Button>
<Button.layouttransform>
<ScaleTransform ScaleX="3"ScaleY="3" />
</Button.layouttransform>
<StackPanel Orientation="Horizontal">
<Canvas Width=" -"Height=" -"VerticalAlignment="Center">
<Ellipse Canvas.Left="1"Canvas.Top="1"Width=" -"Height=" -"
Fill="Yellow"Stroke="Black" />
<Ellipse Canvas.Left="4.5"Canvas.Top="5"Width="2.5"Height="3"
Fill="Black" />
<Ellipse Canvas.Left=" One"Canvas.Top="5"Width="2.5"Height="3"
Fill="Black" />
<Path Data="M 5,10 A 3,3 0 0 0 13,10"Stroke="Blue" />
</Canvas>
<TextBlock VerticalAlignment="Center">Click!</TextBlock>
</StackPanel>
</Button>
ScaleTransform zooms the button 3 times times.
Canvas paint, draw a smiley face, 3 oval, yellow is the outline of the face, yellow is the eyes. The blue pen is the mouth-you can see by the way how these four elements are positioned precisely on a canvas.

WPF notes (1.10 Drawing)--hello,wpf!

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.