Wpf 位图效果不应用于网格边框

Wpf 位图效果不应用于网格边框,wpf,effects,bitmapeffect,Wpf,Effects,Bitmapeffect,我知道我知道我不应该这样做,但我对WPF是如此的陌生,BitmapEffects比Effects更令人畏惧。所以-我在我的窗口中添加了带有位图效果的边框-没有位图效果。边界在那里,但没有应用效果。有什么线索吗 <Border BorderThickness="10" BorderBrush="Red" Padding="10,10,10,10" CornerRadius="5" Margin="5,5,5,5"> <Border.BitmapEffect

我知道我知道我不应该这样做,但我对WPF是如此的陌生,BitmapEffects比Effects更令人畏惧。所以-我在我的窗口中添加了带有位图效果的边框-没有位图效果。边界在那里,但没有应用效果。有什么线索吗

    <Border BorderThickness="10" BorderBrush="Red" Padding="10,10,10,10" CornerRadius="5" Margin="5,5,5,5">
        <Border.BitmapEffect>
            <BevelBitmapEffect BevelWidth="6" LightAngle="120"  Relief="1" EdgeProfile="BulgedUp"/>
        </Border.BitmapEffect>
    </Border>



它只是不起作用,你必须使用特效:

[Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
public BitmapEffect BitmapEffect
{
  get
  {
    return (BitmapEffect) this.GetValue(UIElement.BitmapEffectProperty);
  }
  set
  {
    this.SetValue(UIElement.BitmapEffectProperty, (object) value);
  }
}

如何在XAML中实现这一点?这只是BitmapEffect属性的源代码,不幸的是,没有任何简单的解决方案可以替代BevelBitmapEffect。更多信息:MSDN链接中提供的链接为空。。。现在怎么办?基本上别无选择。您需要使用替代着色器效果,例如DropShadowEffect。