Skip to main content
Home Forums Silverlight Programming Visual Studio & Silverlight Development Tools Converted project (from Beta 1 to Beta 2) is not working.
1 replies. Latest Post by Amanda Wang - MSFT on October 10, 2008.
(0)
mramu1310
Member
0 points
1 Posts
10-08-2008 2:20 AM |
Hi,
I am new to Silverlight.
One of my friend gave me code for Pie chart which was coded in VS 2008 and Silverlight 2.0 Beta1.
I converted it to Silverlight 2.0 Beta 2.
In order to rectify compilation errors I did the following modifications.
a) Changed the statement
myCanvas = this.InitializeFromXaml(new System.IO.StreamReader(s).ReadToEnd()) as Canvas;
to
myCanvas = XamlReader.Load(new System.IO.StreamReader(s).ReadToEnd()) as Canvas;
b) Removed Boolean parameter in XamlReader.Load method.
With the above two modifications the compilation errors were rectified.
when I ran the project i got the runtime error in the following statement
pathElem.SetValue(Path.DataProperty, sbuilder);
I changed this statement to
pathElem.SetValue(System.Windows.Shapes.
Then my project is running with out any errors but it is not showing the Pie chart. Am I missing anything?
Are there any setting to set to run a beta 1 project in Beta 2? Please help me.
Thanks in Advance.
Thanks and Regards
Ramu
Amanda W...
All-Star
17234 points
1,466 Posts
10-10-2008 3:40 AM |
mramu1310:Then my project is running with out any errors but it is not showing the Pie chart. Am I missing anything?
Based on the code that you can see, you declare the System.Windows.Shapes.Path path1, do you want to display the pie chat by using path1?
You need to add the path1 to the usercontrol. for example:
LayoutRoot.Children.Add(path1);
If I mmisunderstand you, please let me know.