I want to draw a string on a picture from the library on Windows Phone. To get the picture I’m using the PhotoChooserTask. After getting the picture I want to write a text of a textbox on this image and save the image to the library.
WriteableBitmap wbmps = new WriteableBitmap(480, 800);
wbmps.SetSource(e.ChosenPhoto);
ScaleTransform transform = new ScaleTransform();
transform.ScaleX = 1;
transform.ScaleY = 1;
wbmps.Render(backgroundPic, transform);
wbmps.Render(diaText, transform);
wbmps.Invalidate();
backgroundPic.Source = wbmps;
But this do not that what I want. So how can I fix it and write something on the image. After this I want to make a colored rectangle around the text, but I don’t know how to do this.
put your elements in a Grid and then render the Grid:
code: