How can I make a WPF Image disableable?

前端 未结 5 1191
野趣味
野趣味 2021-01-21 04:54

I need an Image that is grayed out when disabled (IsEnabled=False). A grayed out version of the image can be produced by reading the BitmapImage into a FormatConvertedBitmap whi

5条回答
  •  执念已碎
    2021-01-21 05:06

    if you use this a lot consider creating a custom Effect introduced with .NET 3.5 SP1 (not bitmapeffect) to render such an operation on your GPU. this effect can then be easily controlled by triggers.

提交回复
热议问题