WEB开发网
开发学院图形图像Flash Silverlight(9) - 2.0画笔之SolidColorBrush, Ima... 阅读

Silverlight(9) - 2.0画笔之SolidColorBrush, ImageBrush, VideoBrush, LinearGradientBrush, RadialGradientBrush

 2008-11-14 11:50:38 来源:WEB开发网   
核心提示: 2、ImageBrush.xaml<UserControl x:Class="Silverlight20.Brush.ImageBrush"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/prese

2、ImageBrush.xaml

<UserControl x:Class="Silverlight20.Brush.ImageBrush"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel HorizontalAlignment="Left">
    <Rectangle Width="100" Height="100" Stroke="Red" StrokeThickness="1">
      <Rectangle.Fill>
      
        <!--ImageBrush - 图像画笔-->
        <!--
        ImageSource - 图片地址
        Stretch属性 - 拉伸值 [System.Windows.Media.Stretch 枚举]。参见:本Demo的Shape/Shape.xaml
        AlignmentX - 水平方向的对齐方式。Center(默认值), Left, Right
        AlignmentY - 垂直方向的对齐方式。Center(默认值), Top, Bottom
        -->
        <ImageBrush ImageSource="/Silverlight20;component/Images/Logo.jpg" AlignmentX="Right" AlignmentY="Bottom" Stretch="None" />
        
      </Rectangle.Fill>
    </Rectangle>
  </StackPanel>
</UserControl>

上一页  1 2 3 4 5  下一页

Tags:Silverlight 画笔 SolidColorBrush

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