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

  • 相关阅读:
    委托和事件
    Entity Framework应用:导航属性
    Entity Framework应用:根据实体的EntityState状态实现增删改查
    Entity Framework应用:使用EF的DataBase First模式实现数据库的增删改查
    Entity Framework应用:EntityFramework DataBase First模式
    dapper支持操作函数和事物
    单元测试
    IOC容器:Unity
    MVC教程九:异常过滤器
    MVC教程八:缓存过滤器
  • 原文地址:https://www.cnblogs.com/yaoge/p/1822615.html
Copyright © 2011-2022 走看看