Skip to main content

Microsoft Silverlight

Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0RSS Feed

(0)

mani_29
mani_29

Member

Member

24 points

119 Posts

Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi Friends,

I create one application with Silverlight 2.0 beta 1.0. Now i want to upgrade to Silverlight2.0  Beta 2.0 version. when i upgrade, i got the below error message  " 'form 1' does not contain a definition for 'InitializeFromXaml' and no extension method 'InitializeFromXaml' accepting a first argument of type 'TStore.UC_Shirts5' could be found (are you missing a using directive or an assembly reference?)" .I change  to  "'InitializeFromXaml'" to "LoadComponent" method. but i could not able to run the application?

Please provide the good solution for me.

Thanks & Regards,

Manikandan.T.R.

pbrooks
pbrooks

Contributor

Contributor

2671 points

355 Posts

Silverlight MVP

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Control.InitializeFromXaml was removed in beta2.  What is the error message you get when you try it with LoadComponent?  The method signature is different between InitializeFromXaml and LoadComponent.  Can you provide a more complete sample containing the code where you are calling this method?

The following resource might help you:

http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx#Control_InitializeFromXaml

 

If this has answered your question, please click on "Mark as Answer" on this post.

Thanks,
Page Brooks
Silverlight MVP, MCSD
PageBrooks.com | @pbrooks

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Thanks for your reply. still i have some problem.if i upgrade to beta1 to beta 2 , what are the changes  i make it(other than Loadcomponent method).

any conversion Tool available? if u know the  good url pls forward me.

 

Thanks,

 

Regards,

Manikandan.T.R.

 

  

Allen Chen – MSFT
Allen Ch...

Star

Star

13862 points

1,803 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi

Unfortunately as far as I know there's no conversion tool available currently. For more details about the breaking changes between Beta 1 and Beta 2 please check out:

http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hey,

I made some changes when i convert to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2. Runtime i got the error" XMLParseExceptionoccured ; [Line: 0 Position: 0]".  I am not using "Calendor and DatePicker" controls.

do u know any other url other than(http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx) pls forward me.

 

Thanks,

Regards,

Mani

 

Allen Chen – MSFT
Allen Ch...

Star

Star

13862 points

1,803 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi

Could you post your project?

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

I send out one sample form. 

namespace TStore

{

public class UC_Shirts2 : Control

{

FrameworkElement _innerContent; public UC_Shirts2()

{

//System.Windows.Application.LoadComponent(this, new System.Uri("/TStore;component\\UC_Shirts2.xaml", System.UriKind.Relative));

  • System.Windows.Application.LoadComponent(this,new System.Uri("TStore;component/UC_Shirts2.xaml", System.UriKind.Relative));

 

//System.IO.Stream s = this.GetType().Assembly.GetManifestResourceStream("TStore.UC_Shirts2.xaml");

//this.InitializeFromXaml(new System.IO.StreamReader(s).ReadToEnd());

 

}

public FrameworkElement InnerContent

{

get

{

return _innerContent;

}

}

}

}

 

I got the error  "System.NullReferenceException: Object reference not set to an instance of an object.
   at TStore.CustomControl.FindName[T](String name)
   at TStore.CategoryPicker.InitializeComponent()
   at TStore.CategoryPicker..ctor() [Line: 0 Position: 0]"

 

Please reply me.

 

Mani

Allen Chen – MSFT
Allen Ch...

Star

Star

13862 points

1,803 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi

I cannot reproduce this problem. If you could post a demo project I think we may find the root cause. You can upload your solution:

http://skydrive.live.com

Then paste the link here for us to download.

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hey,

when i run the silverlight application i got the following error message

"XamlParseException Occured    [Line: 0 Position: 0]". why the error occured?

The error occuring the following line when i run it.

Application.LoadComponent(this, new Uri("TStore.UC_Rondell.xaml", UriKind.Relative));

Please clarify it.

Thanks&Regards,

Mani

Allen Chen – MSFT
Allen Ch...

Star

Star

13862 points

1,803 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi

mani_29:

when i run the silverlight application i got the following error message

"XamlParseException Occured    [Line: 0 Position: 0]". why the error occured?

Please post your current project or you can create a demo project that can reproduce this problem. I cannot reproduce it currently so could not tell you why this exception is thrown.

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hey, where i post it my demo project?

how to post it?

please explain.(no attachment place is there).

Regards, 

Mani 

 

Allen Chen – MSFT
Allen Ch...

Star

Star

13862 points

1,803 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi

You can upload your solution to a public folder here:

http://skydrive.live.com

Then paste the link here for us to download.

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi,

please clarify the problem.

private  FrameworkElement _innerContent;
private Canvas uc_Maroontool;   { canvas  x:Name="uc_Maroontool"  }

we can pass the id  in the below code ,i am getting the XAML file in resourceLocator.

System.Uri resourceLocater = new System.Uri("name;component/UC_tool" + argPattenId + ".xaml", System.UriKind.Relative);
System.Windows.Application.LoadComponent(this, resourceLocater);

I could not get the XAML file  in    _innerContent(showing null)

next line:

_innerContent = this as FrameworkElement;
 uc_Maroontool = (Canvas) _innerContent.FindName("uc_Maroontool");

Why the _innerContent  is getting null value? This problem happens more place.

One more doubt:

I set the value properly.but i am getting the error "Object reference not set to an instance of an object.".

Please explain where i make the change in application?

 

Thanks& Regards,

Manikandan.T.R.

  

 

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Hi

Please find the below URL

http://www.aimtj.com/sample/demo_project.rar

I am getting the error "Line:0 Position:0"  XamlParseException.

Please provide the detailed solution.

TRM

Shaji-mji
Shaji-mji

Participant

Participant

1129 points

260 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

Check the DLL version in your bin folder 

mani_29
mani_29

Member

Member

24 points

119 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

DLL Version in my folder: 1.0 what can i do? TRM

Shaji-mji
Shaji-mji

Participant

Participant

1129 points

260 Posts

Re: Upgrade to silverlight 2.0 beta 1.0 to silverlight 2.0 beta 2.0

 Remove the current reference System.Web.Silverlight.dll, then add it again from the reference window witch will add the new dll to your application

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities