0

I do have my DataContext for DesignMode set like this:

d:DataContext="{d:DesignInstance vm:ViewModelName, IsDesignTimeCreatable=True}"

In total I have lets say 2 ViewModels in both I have defined IsInDesignModeStatic in the Constructor and am creating TestData (Objects) in both.

In both Views I do have my DataTemplates defined, which shouldnt make any difference but still...

Both Viewmodels are defined in the same namespace.

Visual Studio and Blender are suggesting me both ViewModels.

One ViewModel is working in both Views the other one is not and keeps on giving me the error message

object reference not set to an instance of an object

What am I possibly missing?

CodeFanatic
  • 11,434
  • 1
  • 20
  • 38

1 Answers1

1

object reference not set to an instance of an object

This error means you have a null pointer. Look in your model something is not initialized.

It should not be difficult to investigate especially if you have unit test in place.

meda
  • 45,103
  • 14
  • 92
  • 122
  • O_o I did not know yet, that designMode is affected by that, but It is working fine now. Unit Tests will be coming soon. – CodeFanatic Jan 17 '15 at 18:24