4、PasswordBox.xaml
<UserControl x:Class="Silverlight20.Control.PasswordBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left">
<!--
Password - PasswordBox控件的密码值
PasswordChar - PasswordBox控件所显示的密码替代字符。默认值为“●”
-->
<PasswordBox Width="200" PasswordChar="*"></PasswordBox>
</StackPanel>
</UserControl>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left">
<!--
Password - PasswordBox控件的密码值
PasswordChar - PasswordBox控件所显示的密码替代字符。默认值为“●”
-->
<PasswordBox Width="200" PasswordChar="*"></PasswordBox>
</StackPanel>
</UserControl>
5、ProgressBar.xaml
<UserControl x:Class="Silverlight20.Control.ProgressBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left">
<TextBlock x:Name="lblPercent" TextAlignment="Center" />
<!--
Minimum - ProgressBar控件的最小值。参见基类System.Windows.Controls.Primitives.RangeBase
Maximum - ProgressBar控件的最大值。参见基类System.Windows.Controls.Primitives.RangeBase
Value - ProgressBar控件的值。参见基类System.Windows.Controls.Primitives.RangeBase
ValueChanged - ProgressBar控件的值发生变化时所触发的事件
-->
<ProgressBar x:Name="progressBar" Width="200" Height="20" Minimum="10" Maximum="70"></ProgressBar>
<!--
IsIndeterminate - 是否无法确定当前的进度值
false - 可以确定当前的进度值
true - 无法确定当前的进度值。一个Loading动画
-->
<ProgressBar Width="200" Height="20" IsIndeterminate="True" Margin="5"></ProgressBar>
</StackPanel>
</UserControl>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left">
<TextBlock x:Name="lblPercent" TextAlignment="Center" />
<!--
Minimum - ProgressBar控件的最小值。参见基类System.Windows.Controls.Primitives.RangeBase
Maximum - ProgressBar控件的最大值。参见基类System.Windows.Controls.Primitives.RangeBase
Value - ProgressBar控件的值。参见基类System.Windows.Controls.Primitives.RangeBase
ValueChanged - ProgressBar控件的值发生变化时所触发的事件
-->
<ProgressBar x:Name="progressBar" Width="200" Height="20" Minimum="10" Maximum="70"></ProgressBar>
<!--
IsIndeterminate - 是否无法确定当前的进度值
false - 可以确定当前的进度值
true - 无法确定当前的进度值。一个Loading动画
-->
<ProgressBar Width="200" Height="20" IsIndeterminate="True" Margin="5"></ProgressBar>
</StackPanel>
</UserControl>
ProgressBar.xaml.cs
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
![](https://ucc.alicdn.com/notfound.png?x-oss-process=image/resize,w_1400/format,webp)
6、RadioButton.xaml
<UserControl x:Class="Silverlight20.Control.RadioButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left">
<!--
GroupName - RadioButton控件所属组的组名
Checked - 被选中后所触发的事件
Click - 被单击后所触发的事件
-->
<RadioButton GroupName="groupName" Content="红色的RadioButton" Background="Red" Margin="5" />
<!--
IsEnabled - RadioButton是否有效
-->
<RadioButton GroupName="groupName" Content="无效的RadioButton" IsEnabled="False" Margin="5" />
<!--
IsChecked - 是否被选中
RadioButton.Content - RadioButton所对应的内容
-->
<RadioButton GroupName="groupName" Margin="5" IsChecked="true">
<RadioButton.Content>
<Image Source="/Silverlight20;component/Images/Logo.jpg" Width="200" />
</RadioButton.Content>
</RadioButton>
</StackPanel>
</UserControl>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left">
<!--
GroupName - RadioButton控件所属组的组名
Checked - 被选中后所触发的事件
Click - 被单击后所触发的事件
-->
<RadioButton GroupName="groupName" Content="红色的RadioButton" Background="Red" Margin="5" />
<!--
IsEnabled - RadioButton是否有效
-->
<RadioButton GroupName="groupName" Content="无效的RadioButton" IsEnabled="False" Margin="5" />
<!--
IsChecked - 是否被选中
RadioButton.Content - RadioButton所对应的内容
-->
<RadioButton GroupName="groupName" Margin="5" IsChecked="true">
<RadioButton.Content>
<Image Source="/Silverlight20;component/Images/Logo.jpg" Width="200" />
</RadioButton.Content>
</RadioButton>
</StackPanel>
</UserControl>
OK
[源码下载]
[源码下载]
本文转自webabcd 51CTO博客,原文链接:
http://blog.51cto.com/webabcd/342817
,如需转载请自行联系原作者