Looks like I managed to solve it by calling UpdateLayout on my usercontrol before and after each measure and arrange calls, working good so far. if anyone has another solution please let me know
I have a problem similar to the one in this post and it seems that the user has found the reason behind it. I was wondering if there is any other solution other than creating a stack panel to get proper rendering of the live tile upon updating? the same code works just fine when creating the tile but fails to render properly when updating.
this is my method:
private void updateFrontTile()
{
var frontTile = new FrontMzaarTileControl();
TileData tileData = new TileData()
{
temp= "1",
temp2= "2",
temp3= "3",
temp4= "4",
temp5= "5"
};
frontTile.DataContext = tileData;
frontTile.Measure(new Size(691, 336)); // the user from the other post believes that this is not doing anything
frontTile.Arrange(new Rect(0, 0, 691, 336)); // the user from the other post believes that this is not doing anything
var bmp = new WriteableBitmap(691, 336);
bmp.Render(frontTile, null);
bmp.Invalidate();
var isf = IsolatedStorageFile.GetUserStoreForApplication();
FrontTileFilename = "/Shared/ShellContent/FrontTile.jpg";
if (!isf.DirectoryExists("/Shared/ShellContent"))
{
isf.CreateDirectory("/Shared/ShellContent");
}
using (var stream = isf.OpenFile(FrontTileFilename, System.IO.FileMode.Create))
{
bmp.SaveJpeg(stream, 691, 336, 0, 100);
}
}