I have next code:
var bmp = new WriteableBitmap((int)size.Width, (int)size.Height);
bmp.Render(new Canvas(){Background = new SolidColorBrush(Colors.White)}, null);
bmp.Invalidate();
return bmp;
How I get colors:
var backColor = Application.Current.Resources["PhoneBackgroundColor"].ToString();
var foreColor = Application.Current.Resources["PhoneForegroundColor"].ToString();
I need to render image with white background. But this code always render image with black back. Foreground is ok, I've tested with next structure:
Canvas
Textblock - with black foreground
Textblock - with black foreground
So where is the issue?