我知道我知道我不应该这样做,但是我对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>
发布于 2019-10-27 06:01:40
这是行不通的,你必须用特效来代替:
[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);
}
}
https://stackoverflow.com/questions/58574975
复制相似问题