1

Possible Duplicate:
Write text on image in WP7

I have an app and one of the feature I want to add to it is , sending the picture with some text on top of it.IS that possible to code this in windows phone ?

Community
  • 1
  • 1
krrishna
  • 2,050
  • 4
  • 47
  • 101

1 Answers1

5

Easy way is just rendering a TextBlock with the text on a WriteableBitmap

private void RenderString(WriteableBitmap bitmap, string stringToRender)
{
    TextBlock textBlock = new TextBlock();
    textBlock.Text = stringToRender;

    // set font, size, etc. on textBlock

    bitmap.Render(textBlock, null);
    bitmap.Invalidate();
}
Pedro Lamas
  • 7,185
  • 4
  • 27
  • 35