共用方式為


BlurBitmapEffect.KernelType 屬性

定義

注意:這個 API 現在已經過時。 非過時的替代方式是 BlurEffect。 取得或設定用於 BlurBitmapEffect 的模糊核心 (Kernel) 型別。

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

屬性值

模糊核心的型別。 預設值是 Gaussian

範例

下列範例示範如何指定 KernelTypeBlurBitmapEffect

<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

適用於