Reputation: 979
I want to know how to overlay one image over the over in Windows Phone. I did some search online, a lot of people suggest put two images into one grid and adjust the margin. However, my case is a little different. I'm making the background image of the secondary tile, I want to integrate the two images, store it locally and make the tile. So I can't put them into a grid. So what should I do in this case? Thanks!
Upvotes: 0
Views: 857
Reputation: 2216
I made this work using Ku6opr method using the following
WriteableBitmap bmp = new WriteableBitmap(173, 173);
bmp.Render(renderRoot, new TranslateTransform());
bmp.Invalidate();
where renderRoot is the usercontrol containing the Grid and the Image. I then save the bmp to the /Shared/ShellContent folder in Isolated storage.
Upvotes: 1
Reputation: 8126
You can create UserControl
with any layout you wish (173x173px
). Then, when you need to generate a tile, put this control to a page (probably out of the screen) and make and image from it with new WriteableBitmap(YourTile, null);
. Than save these image to the /Shared/ShellContent/
and you are done
Probably there are better solutions for this task but this works fine too
Upvotes: 2