我知道我不应该这样做,但是我对WPF还是很陌生,而BitmapEffects并不比Effects令人生畏。所以-我在窗口中添加了一个带有bitmapeffects的边框,并且-没有bitmap效果。边界在那里,但没有效果在应用。有任何线索吗?
<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);
}
}