Bitmap Effect已经过时了。UIElement.BitmapEffect property is obsolete
没办法,Bitmap Effect的效率过于低下,有时还有莫名其妙的界面闪烁。所以用有硬件(GPU)支持的Effect来代替吧。注意,只适用于.Net 3.5 sp1以后版本。
有以下文章可以参考:
- WPF Sample Series - Solution for the Obsolete BitmapEffect Property and Rendering an OuterGlowBitmapEffect
- GPU-accelerated custom Effects for WPF
- Using Effects in WPF (Part 2)
- More details on how Effects work
- Writing custom GPU-based Effects for WPF
- A simple Effect sample project and ClickOnce application
- Writing custom Effects - adding parameters to Effects
- A VisualStudio BuildTask and project and item templates for writing ShaderEffects
- Introducing Multi-Input Shader Effects
- A More Useful Multi-Input Effect