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>