2

Im trying to convert my WPF project, written in MVVM template into a silverlight project.

However, i am running into some problems.

There is a class in the ViewModel folder (WPF) called BaseViewModel, that uses System.Windows.UIElement and System.Windows.Application.

But I can not find reference to these classes. Is there a workaround?

RKM
  • 3,151
  • 9
  • 37
  • 50
  • Please check out this discussion: http://stackoverflow.com/questions/212111/convert-wpf-application-to-silverlight There's some pretty useful links and advice for you problem there :) – Ashley Grenon Mar 30 '11 at 22:17
  • Thanks, it is helpful. Although, all other parts of my projects are ported nicely, I just could not port one class properly, wondering if anyone has any workaround to it... or maybe it is just immediately obvious, that I can not see it.. – RKM Mar 30 '11 at 22:20

1 Answers1

2

Both of these classes are in Silverlight's System.Windows namespace and are supported in SL 3 and 4.

Try installing the Silverlight 4 Tools for Visual Studio from here. When creating a new Silverlight project in VS2010, the reference should be added automatically. For reference, my path to the reference was: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll

dugas
  • 12,025
  • 3
  • 45
  • 51
  • i am using Silverlight 4.0. But i cant seem to be able to locate it – RKM Mar 30 '11 at 22:37
  • @Rosie - read my edit in this answer and see if that helps you out. – dugas Mar 31 '11 at 04:43
  • Hi, thanks very much. I did add the reference assembly. But when I tried application.Current.Shutdown, it still gives an error saying the assembly was missing .... – RKM Mar 31 '11 at 13:09