We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Draw chart on WriteableBitmap with background agent

Thread ID:





116910 Jun 29,2014 04:55 PM UTC Jul 3,2014 10:22 AM UTC Windows Phone 3
Tags: Chart
Asked On June 29, 2014 04:55 PM UTC


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);

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?

Attachment: tile01_42dd639e.zip

Mohammed Azarudeen [Syncfusion]
Replied On June 30, 2014 12:52 PM UTC

Hi Peni,

We have analyzed the reported issue and we are unable to reproduce the issue. Can you please check with the sample in the following location? If still you face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you.

Please let us know if you have any queries.


Mohammed Azarudeen.

Attachment: WritableBitmapDemo_aa65347f.zip

Replied On June 30, 2014 05:19 PM UTC


I had updated the sample code.

Main changes:
1. There is a scheduled task to draw chart from background agent, not foreground application.
2. ChartUserControl is in class library project, not application project.

The result image is img2.jpg.

Thank you.

Attachment: WritableBitmapDemo_5201b174.zip

Sheik Syed Abthaheer M [Syncfusion]
Replied On July 3, 2014 10:22 AM UTC

Hi Peni,


Thanks for your update.


We have analyzed the reported issue and we could not find the issue in our control. We suspect that, the issue may be framework issue.   The Item source does not bind while bitmap renders the new instance of User Control.  We have modified your code with Microsoft control and able to reproduce the issue with Microsoft control. Please find the sample in the below location.

Please let us know if you require further assistance on this.



M. Sheik

Attachment: WritableBitmapDemo_50cd7faf.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon