WEB开发网
开发学院图形图像Flash Silverlight(3) - 2.0控件之Border, Button, Cale... 阅读

Silverlight(3) - 2.0控件之Border, Button, Calendar, Canvas, CheckBox, ComboBox

 2008-11-14 11:50:54 来源:WEB开发网   
核心提示:本文源代码下载地址:http://flashview.ddvip.com/2008_11/Silverlight.rar在线DEMOhttp://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html 示例1、Border.xaml<UserControl

本文源代码下载地址:

http://flashview.ddvip.com/2008_11/Silverlight.rar

在线DEMO

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

示例

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 - 边框的宽度(像素值:上下左右;左右,上下;左,上,右,下)
    BorderBrush - 边框的颜色
    CornerRadius - 边框角的半径
    -->
    <Border BorderThickness="1,3,5,7" BorderBrush="Red" CornerRadius="10" Width="120" Margin="5">
      <TextBlock Text="红色Border" ToolTipService.ToolTip="红色Border" TextAlignment="Center" />
    </Border>
  
    <!--
    Border.BorderBrush - 继承自 System.Windows.Media.Brush 的对象
    -->
    <Border BorderThickness="3" CornerRadius="10" Width="120" Margin="5">
      <TextBlock Text="红色Border" ToolTipService.ToolTip="红色Border" TextAlignment="Center" />
      <Border.BorderBrush>
        <ImageBrush ImageSource="http://silverlight.net/Themes/silverlight/images/logo.jpg" />
      </Border.BorderBrush>
    </Border>
  
  </StackPanel>
</UserControl>

1 2 3 4 5 6  下一页

Tags:Silverlight 控件 Border

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接