0

I have a RelativePanel that contains two children:

  • a FrameworkElement A with a ContainerVisual cvA that acts like a background
  • a RelativePanel B with another ContainerVisual cvB that displays some rectangles on the foreground.

To understand better, suppose I have an image as CompositionBrush of a SpriteVisual inside cvA, and I have to super-impose the rectangles (that are SpriteVisuals as well) of cvB.

I want to alpha-blend the colors of the image vs. the rectangles using multiplication (rather than addition), so that those rectangles seems to highlight portions of the image.

How can I achieve this goal?

Note: here you can find a project to reproduce the environment: https://github.com/cghersi/UWPExamples/tree/master/MultiplyAlphaBlending

Cristiano Ghersi
  • 1,944
  • 1
  • 20
  • 46

0 Answers0