Tips used by buttons in Silverlight

Source: Internet
Author: User

1. The buttons in Silverlight do not have the mouseleftbuttondown and mouseleftbuttonup events. Because Sl has already stored these two events in the buttonbase class
E. hanlder of is set to true. Therefore, these two events are not referenced. If you want to use the click event,
Use click

2. The contentpresentation in the button template can be used to load a container, and any controls can be loaded in the container. Use the followingCodeTo display the content of a button.

<Button style = "{staticresource buttonstyle}">
& Lt; grid Height = "50" width = "100" & gt;
<Rectangle fill = "# ffcbe3ff" stroke = "# ff000000" margin = "8, 8, 24, 8"/>
<Textblock Height = "16" margin = "34,0, 8, 1" verticalignment = "bottom" foreground = "# ffa40cdd" text = "textblock"
Textwrapping = "Wrap"/>
<Textbox background = "# ffecff6e" Height = "21" margin = "0,0, 44,0" verticalignment = "TOP" text = "textbox"
Textwrapping = "Wrap"/>
</GRID>
</Button>

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.