Hi
I just want to add text to the writeablebitmap and save to .png files,
So I referenced the below discussion thread
Is it possible to add text to bitmap?
I just want to add text to the writeablebitmap and save to .png files,
So I referenced the below discussion thread
Is it possible to add text to bitmap?
public static void DrawText(this WriteableBitmap wBmp,Point at, string text,double fontSize,Color textColor)
{
TextBlock lbl = new TextBlock();
lbl.Text = text;
lbl.FontSize = fontSize;
lbl.Foreground = new SolidColorBrush(textColor);
WriteableBitmap tBmp = new WriteableBitmap(lbl, null);
wBmp.Blit(at, tBmp, new Rect(0, 0, tBmp.PixelWidth, tBmp.PixelHeight), Colors.White, System.Windows.Media.Imaging.WriteableBitmapExtensions.BlendMode.Alpha);
}
But this way seems like can't be used in metro style app ....