views:

231

answers:

2

I have the following code:

XAML code for Window1.xaml and the VB.Net code for Window1.xaml.vb.

The error I get is the following:

"Cannot create instance of 'Window1' defined in assembly 'ServiceControl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'ServiceControl;component/Window1.xaml' Line 2 Position 2."

I can't see any problem in the code and what it should do is trigger an animation depending on the status of a service (spooler service in this case). It may be because I am manually referencing to the System.ServiceProcess namespace, which is not available in WPF framework by default, but I'm not sure. Anybody can help?

Thanks.

A: 

You're only looking at the top level exception message. Drill in and look at the inner exception.

HTH, Kent

Kent Boogaart
Actually I changed something in the declaration of the Storyboard in the .vb file. I changed "FindResource" for "FindName" and added a "Name="xxx"" property to both Storyboards in the XAML file and this time it loaded. Now I'm getting a thread related error, which I think I might be able to fix.Thx!
TuxMeister
A: 

Actually I changed something in the declaration of the Storyboard in the .vb file. I changed "FindResource" for "FindName" and added a "Name="xxx"" property to both Storyboards in the XAML file and this time it loaded. Now I'm getting a thread related error, which I think I might be able to fix.

TuxMeister