zoukankan      html  css  js  c++  java
  • Silverlight学习笔记2 纹理模糊

      直接进入主题:

            BlurEffect   使目标纹理模糊的位图效果

      首先我们得using 一下:   using System.Windows.Media.Effects;

      给button一个Click事件  方法如下

    代码
    private void OnClickBlurButton(object sender, RoutedEventArgs args)
    {
        
    // Toggle effect
        if (((Button)sender).Effect != null)
        {
            ((Button)sender).Effect 
    = null;
        }
        
    else
        {
            
    // Get a reference to the Button.
            Button myButton = (Button)sender;
          
            
    // Initialize a new BlurEffect that will be applied
            
    // to the Button.
            BlurEffect myBlurEffect = new BlurEffect();

            
    // Set the Radius property of the blur. This determines how 
            
    // blurry the effect will be. The larger the radius, the more
            
    // blurring. 
            myBlurEffect.Radius = 10;
            
             ss.Effect
    =myBlurEffect;//说明 ss我放入的一个图片name

            
    // Apply the effect to the Button.
            myButton.Effect = myBlurEffect;
        }
    }

     显示效果

    算了 网速太卡。。。不上传效果了 。。。自己学习中

  • 相关阅读:
    layui 参照赋值的两种方式
    c笔记
    Linux操作系统笔记
    make笔记
    Gcc如何知道文件类型。
    #include <xxx.h>和#include "xxx.h"的区别
    GCC编译流程
    c++ Socket客户端和服务端示例版本三(多线程版本)
    c++ Socket客户端和服务端示例版本二
    c++ Socket客户端和服务端示例版本一
  • 原文地址:https://www.cnblogs.com/blueSkys/p/1703166.html
Copyright © 2011-2022 走看看