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

  • 相关阅读:
    spring 解析bean
    Spring Cloud
    Spring
    JDK动态代理源码实现深入分析
    一个很坑的问题,button 的onclick方法失效了
    web总结
    字符串编码
    海量数据的解决方案--笔记
    链接保存
    读《JVM虚拟机》- 集中简单的垃圾收集算法
  • 原文地址:https://www.cnblogs.com/yaoge/p/1822615.html
Copyright © 2011-2022 走看看