Learn about Windows Phone7 Development (13. Two Button controls)

Source: Internet
Author: User

There are a variety of button controls in Silverlight that are also well supported in Windows Phone7.

A. Button: This control is just a basic control, through the blend can create a variety of effects of the button.

<button content= "Button1" height= "Bayi" horizontalalignment= "left" margin= "135,99,0,0" Name= "Button1" Verticalalignment= "Top" width= "213" click= "Button1_Click" background= "Red" foreground= "Beige" borderbrush= "Yellow" borderthickness= "5"/>

Click: Response to clicked event.

You can set a variety of effects for a button by using the Blend tool:

<button content= "Button2" height= "Bayi" horizontalalignment= "left" margin= "135,237,0,0" x:name= "Button2" Verticalalignment= "Top" width= "213" foreground= "Beige" borderbrush= "yellow" borderthickness= "5" >
<Button.Background>
<lineargradientbrush endpoint= "0.5,1" mappingmode= "RelativeToBoundingBox" startpoint= "0.5,0" >
<gradientstop color= "#FFF9F9F9" offset= "0.543"/>
<gradientstop color= "#FFF90808" offset= "0.996"/>
<gradientstop color= "Red" offset= "0.03"/>
</LinearGradientBrush>
</Button.Background>
</Button>
<button content= "Button3" height= "Bayi" horizontalalignment= "left" margin= "135,394,0,0" x:name= "Button3"  Verticalalignment= "Top" width= "213" foreground= "Beige" borderbrush= "yellow" borderthickness= "5" ClickMode= "Press" >
<Button.Background>
<imagebrush imagesource= "/chrysanthemum.jpg" stretch= "UniformToFill"/>
</Button.Background>
</Button>

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.