PropertyChangingEventArgs Error

Mar 10, 2012 at 6:55 PM

Hi
today I started to use this toolkit in my windows phone application, but I have a problem:

I used the Sql Server Compact Toolbox for create the datacontext from a sqlce. the class generated, contains this statement:

private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

this row cause an error in design mode: Common Language Runtime detected an invalid program.

I found this error, because i was implementing the DesignDataService and I wanted to return some instance of  a class genereated by the SqlServerCompactToolbox.

So, if i put this code:

try
            {
                var a = new System.ComponentModel.PropertyChangingEventArgs("aa");
            }
            catch (System.Exception ex)
            {
                System.Windows.MessageBox.Show(ex.ToString());
            }

in a constructor of a viewmodel, when I try to open its view in the designer (both in Visual Studio and Expression Blend), the program show the messagebox with the error.

I know I can change the code in the class generated by SqlServerCompactToolbox, but, if it's possible, I would like to understand why it's happen and if it's normal.
It happens both in the 3.1 version and in the 4.0beta version of the toolkit.

If you need it, I can prepare a very small project to show the problem, anyway if you add the above snippet code  in a viewmodel constructor you can see the error.

thank you

Luca

 

Coordinator
Mar 10, 2012 at 7:42 PM
Hi,

Thanks for the report. I will look into it next week.

Cheers
Laurent

Sent from my Windows Phone

From: Luca7993
Sent: 10.03.2012 19:55
To: laurent@galasoft.ch
Subject: PropertyChangingEventArgs Error [mvvmlight:348118]

From: Luca7993

Hi
today I started to use this toolkit in my windows phone application, but I have a problem:

I used the Sql Server Compact Toolbox for create the datacontext from a sqlce. the class generated, contains this statement:

private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

this row cause an error in design mode: Common Language Runtime detected an invalid program.

I found this error, because i was implementing the DesignDataService and I wanted to return some instance of a class genereated by the SqlServerCompactToolbox.

So, if i put this code:

try
            {
                var a = new System.ComponentModel.PropertyChangingEventArgs("aa");
            }
            catch (System.Exception ex)
            {
                System.Windows.MessageBox.Show(ex.ToString());
            }

in a constructor of a viewmodel, when I try to open its view in the designer (both in Visual Studio and Expression Blend), the program show the messagebox with the error.

I know I can change the code in the class generated by SqlServerCompactToolbox, but, if it's possible, I would like to understand why it's happen and if it's normal.
It happens both in the 3.1 version and in the 4.0beta version of the toolkit.

If you need it, I can prepare a very small project to show the problem, anyway if you add the above snippet code in a viewmodel constructor you can see the error.

thank you

Luca

Mar 10, 2012 at 11:17 PM
Hi
If you prefer I can prepare a small project so you can immediately view the error.

Thank you for your work
Luca

Da: lbugnion
Inviato: 10/03/2012 20:42
A: luca@alimede.it
Oggetto: Re: PropertyChangingEventArgs Error [mvvmlight:348118]

From: lbugnion

Hi,

Thanks for the report. I will look into it next week.

Cheers
Laurent

Sent from my Windows Phone

From: Luca7993
Sent: 10.03.2012 19:55
To: laurent@galasoft.ch
Subject: PropertyChangingEventArgs Error [mvvmlight:348118]

From: Luca7993

Hi
today I started to use this toolkit in my windows phone application, but I have a problem:

I used the Sql Server Compact Toolbox for create the datacontext from a sqlce. the class generated, contains this statement:

private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

this row cause an error in design mode: Common Language Runtime detected an invalid program.

I found this error, because i was implementing the DesignDataService and I wanted to return some instance of a class genereated by the SqlServerCompactToolbox.

So, if i put this code:

try
            {
                var a = new System.ComponentModel.PropertyChangingEventArgs("aa");
            }
            catch (System.Exception ex)
            {
                System.Windows.MessageBox.Show(ex.ToString());
            }

in a constructor of a viewmodel, when I try to open its view in the designer (both in Visual Studio and Expression Blend), the program show the messagebox with the error.

I know I can change the code in the class generated by SqlServerCompactToolbox, but, if it's possible, I would like to understand why it's happen and if it's normal.
It happens both in the 3.1 version and in the 4.0beta version of the toolkit.

If you need it, I can prepare a very small project to show the problem, anyway if you add the above snippet code in a viewmodel constructor you can see the error.

thank you

Luca