Search code examples
wpfimagexamlmasking

WPF Image Overlay


I have an <Image /> used in a ControlTemplate to show a 24 bit PNG. Ontop of this, I'd like to apply a semi-transparent gray layer to make it appear half disabled. The problem I'm having is that if I just apply a gray layer, the transparent parts of the image just change to gray, instead of staying transparent and only applying to the coloured parts.


Solution

  • You could set the Opacity of the Image instead.