Hi,
I want to create a live tile with a line graph on it, so my App has a background agent to draw UserControl with SfChart on a WriteableBitmap, and then show the image on live tile.
Code Example:MyChartUserControl uc = new MyChartUserControl();
WriteableBitmap wbmp = new WriteableBitmap(691, 336);
wbmp.Render(uc, null);
wbmp.Invalidate();
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
{
using (IsolatedStorageFileStream imageStream = new IsolatedStorageFileStream(TILE_IMAGE_PATH, System.IO.FileMode.Create, isf))
{
wbmp.SaveJpeg(imageStream, wbmp.PixelWidth, wbmp.PixelHeight, 0, 100);
}
}
// Update tile image
// .......
However, if draw line chart on WriteableBitmap with background agent, the line disappears (Please refer to the attached). And if add line chart to PhoneApplicationPage of my App, it draws correctly.
May I know how to draw a line chart on WriteableBitmap with background agent?
Thanks.
Attachment:
tile01_42dd639e.zip