This project is read-only.

Blitting 2 UI Elements with transparency

Mar 27, 2012 at 3:21 PM

We have been using WriteableBitmapEx to enhance the performance of drawing thousands of UIElements to the screen. From various XAML templates, we blit various elements together onto 1 bitmap. However, we have encountered a problem with transparency.

First we blit a pie shape that fades from white to transparent. then we blit a TextBlock overtop, the textblock has transparency in it, so does the pie shape. However, the outcome is not what you would expect. There are BLACK pixels everywhere where the transparencies mix. Makes the whole thing look aweful.

Anyone has any ideas on what we might be doing wrong? Literally we are creating 2 writeablebitmaps from UIElements, then blitting those together, and the results are not proper. We use alpha blending mode, but I've tried to switch the modes to try and get different results, but to no avail.

ANY ideas or help would be appreciated at this point.

Mar 27, 2012 at 7:44 PM

Please provide an isolated repro to get better help. 


- Rene Schulte