zoukankan      html  css  js  c++  java
  • vs2010 学习Silverlight学习笔记(22):Brush填充

    概要:

           学习五种填充方式:

    SolidColorBrush、 LinearGradientBrush、RadialGradientBrush、ImageBrush、VideoBrush

    内容:

           SolidColorBrush:

    <Rectangle StrokeThickness="3" Stroke="Red"Width="100" Height="100"

                       Canvas.Left="10"Canvas.Top="10">

               <Rectangle.Fill>

                    <SolidColorBrushColor="Orange"Opacity="0.5">

                    </SolidColorBrush>

               </Rectangle.Fill>

           </Rectangle>

           LinearGradientBrush:

                  <RectangleStrokeThickness="3" Stroke="Red" Width="100"Height="100"

                       Canvas.Left="10"Canvas.Top="10">

               <Rectangle.Fill>

                    <SolidColorBrushColor="Orange"Opacity="0.5">

                    </SolidColorBrush>

               </Rectangle.Fill>

           </Rectangle>

           RadiaGradientBrush:

                  <RectangleStroke="red" StrokeThickness="3" Width="100"Height="100"

                       Canvas.Left="10"Canvas.Top="150">

               <Rectangle.Fill>

                    <RadialGradientBrushGradientOrigin="0.5,0.5" Center="0.5,0.5"

                                         RadiusX="0.5"RadiusY="0.5">

                        <GradientStopColor="#FBFE03" Offset="0.0"></GradientStop>

                        <GradientStopColor="#41F702"Offset="0.25"></GradientStop>

                        <GradientStopColor="#FF0000" Offset="0.75"></GradientStop>

                        <GradientStopColor="#0066FF" Offset="1.0"></GradientStop>

                    </RadialGradientBrush>

               </Rectangle.Fill>

           </Rectangle>

           ImageBrush:

                  <RectangleStroke="Black" StrokeThickness="3" Width="100"Height="100"

                       Canvas.Left="150"Canvas.Top="150">

               <Rectangle.Fill>

                    <ImageBrushImageSource="/SLDemo27Brush;component/LiveSearch.png"></ImageBrush>

               </Rectangle.Fill>

           </Rectangle>

    总结:

           常用到的会有:SolidColorBrush,LinearGradientBrush,ImageBrush

  • 相关阅读:
    Tomcat单独部署,控制台乱码解决方法
    mysql授权访问数据库
    Arrays.binarySearch采坑记录及用法
    使用Spring Ehcache二级缓存优化查询性能
    Redis批量删除缓存数据
    Java并发包之Semaphore用法
    Java并发包之CountDownLatch用法
    如何用Xshell导出文件到桌面本地
    Semaphore信号量原理
    老应用链接替换到新链接
  • 原文地址:https://www.cnblogs.com/yaoge/p/1822615.html
Copyright © 2011-2022 走看看