Thanks for the feedback. It helped me solve my issue. Below is what I opted to do:
Converted the control in to xaml and stored it in database. Later when required, pulled the xaml and recreated the control.
save to database
try
{
string str = "";
System.Windows.Controls.Canvas temp = new System.Windows.Controls.Canvas();
temp = (System.Windows.Controls.Canvas)GraphArea.FindName("CANVASNAME");
str = XamlWriter.Save(temp);
GraphArea.Children.Remove(temp);
GraphArea.UnregisterName(temp.Name);
}
catch (Exception exp)
{
}
End
Pull data from database and recreate the control
String strName = "";
str = "";
System.Windows.Controls.Canvas canvas = System.Windows.Markup.XamlReader.Load(new System.Xml.XmlTextReader(new System.IO.StringReader(str))) as System.Windows.Controls.Canvas;
strName = canvas.Name;
GraphArea.Children.Add(canvas);
GraphArea.RegisterName(strName, canvas);
End
Solution 2 is what I opted for.
http://forums.silverlight.net/forums/p/65180/160429.aspx[
Praveen