Slow and steady Silverlight (3)

Source: Internet
Author: User
Tags xmlns silverlight

Slow and steady Silverlight (3)-2.0 control Border,button,calendar,canvas,checkbox,combobox

Online Demo

Http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html

Example

1, Border.xaml

<usercontrol x:class= "Silverlight20.Control.Border"
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml" >
<stackpanel horizontalalignment= "Left" >

<!--
BorderThickness-the width of the border (pixel value: up or down, up or down; left, up, right, bottom)
BorderBrush-the color of the border
Cornerradius-radius of the border angle
-->
<border borderthickness= "1,3,5,7" borderbrush= "Red" cornerradius= "" width= "the" margin= "5" >
<textblock text= "Red border" tooltipservice.tooltip= "red Border" textalignment= "Center"/>
</Border>

<!--
Border.borderbrush-objects that inherit from System.Windows.Media.Brush
-->
<border borderthickness= "3" cornerradius= "Width=" margin= "5" >
<textblock text= "Red border" tooltipservice.tooltip= "red Border" textalignment= "Center"/>
<Border.BorderBrush>
<imagebrush imagesource= "mt788654"/>
</Border.BorderBrush>
</Border>

</StackPanel>
</UserControl>

2, Button.xaml

<usercontrol x:class= "Silverlight20.Control.Button"
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml" >
<stackpanel horizontalalignment= "left" width= ">"

<!--
Content-what is displayed on the button
Click-clicking event for button
Cursor-the mouse pointer style when you move the mouse over the button
Arrow-Arrows
Hand-Hand shape
Wait-Hourglass
iBEAM-"I" glyphs
Stylus-point
Eraser-Rubber
None-None
Padding-The filling distance between the contents of the container and the edge of the container (pixel value: up or down; left, right, bottom)
-->
<button tag= "I am button" content= "I am Button" cursor= "Eraser" click= "Button_Click" padding= "5" margin= "5"/>

<!--
IsEnabled-button is valid
-->
<button tag= "Invalid button" content= "Invalid button" isenabled= "False" click= "Button_Click" margin= "5"/>

<!--
Button.content-What is displayed on the button
Clickmode-Type of trigger click event [System.Windows.Controls.ClickMode enum]
Clickmode.press-left mouse button click
Clickmode.release-left mouse button click and release
Clickmode.hover-Mouse over
-->
<button tag= "Picture Button" clickmode= "release" click= "Button_Click" margin= "5" >
<Button.Content>
<image source= "/silverlight20;component/images/logo.jpg"/>
</Button.Content>
</Button>

</StackPanel>
</UserControl>

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.