Header properties for TextBox controls in Windows Phone development

Source: Internet
Author: User

Note: Bo Master windows Phone Learning Novice, in the blog Park to share their just mastered some of the learning notes, simple content, master do not spray!

A while ago to see @ disappeared 3003 of the blog, found the TEXTBOXT header properties. This property can be useful for saving a lot of code when writing the UI.

Before writing a login interface as follows, the code will be very long;

UI and code that did not use the header property;

The code is as follows;

<Grid> <textblock text="Login"Fontsize=" -"margin="0,15,0,600"/> <textblock text="number/QQ"Fontsize=" -"margin="0,40,0,560"/> <textblock text="Account Number"Fontsize=" -"margin="20,105,0,500"/> <textbox text="number/Mobile number/QQ No."margin="20,130,50,450"/> <textblock text="Password"Fontsize=" -"margin="20,190,50,425"/> <textbox text="please fill in the password"margin="20,220,50,380"/> "Forgot your password? "Fontsize=" -"Foreground="Blue"margin="20,280,0,320"/> "Create a new account"Fontsize=" -"Foreground="Blue"margin="20,318,0,275"/> </Grid>

UI and code after using the header property;

The code is as follows

<grid > <textblock text="Login"Fontsize=" -"margin="0,15,0,600"/> <textblock text="number/QQ"Fontsize=" -"margin="0,40,0,560"/> <textbox header="Account Number"text="number/Mobile number/QQ No."margin="20,130,50,430"/> <textbox header="Password"text="please fill in the password"margin="20,220,50,350"/> "Forgot your password? "Fontsize=" -"Foreground="Blue"margin="20,280,0,320"/> "Create a new account"Fontsize=" -"Foreground="Blue"margin="20,318,0,275"/> </Grid>

By contrast, two lines of code are saved, and the advantage of the header property is greater in cases where the TextBox and TextBlock controls are more numerous.

Header properties for TextBox controls in Windows Phone development

Related Article

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.