BlurBitmapEffect.KernelType 属性

定义

注意:此 API 现已过时。 未过时的替代项为 BlurEffect。 获取或设置用于 BlurBitmapEffect 的模糊内核的类型。

public:
 property System::Windows::Media::Effects::KernelType KernelType { System::Windows::Media::Effects::KernelType get(); void set(System::Windows::Media::Effects::KernelType value); };
public System.Windows.Media.Effects.KernelType KernelType { get; set; }
member this.KernelType : System.Windows.Media.Effects.KernelType with get, set
Public Property KernelType As KernelType

属性值

KernelType

模糊内核的类型。 默认值是 Gaussian

示例

下面的示例演示如何指定 KernelType .BlurBitmapEffect

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <StackPanel>
    <Button  Width="200">You Can't Read This!
      <Button.BitmapEffect>

      <!-- <BitmapEffectGroup> would go here if you wanted to apply more 
             then one effect to the Button. However, in this example only  
             one effect is being applied so BitmapEffectGroup does not need  
             to be included. -->

        <!-- The larger the Radius, the more blurring. The default range is 20.
             In addition, the KernelType is set to a box kernel. A box kernel
             creates less disruption (less blur) then the default Gaussian kernel. -->
        <BlurBitmapEffect Radius="10" KernelType="Box" />

      </Button.BitmapEffect>
    </Button>

  </StackPanel>

</Page>

注解

依赖项属性信息

标识符字段 KernelTypeProperty
元数据属性设置为 true

适用于