IntegerUpDown and the Visual Studio Crash

Oct 26, 2011 at 9:30 PM

I just thought I would post this so that others might avoid the problem I had. When using the IntegerUpDown control ALWAYS bind the value to a property that returns int? (i.e. a nullable int). While the control works fine when bound to an int at run-time, this is not true at design time. I had bound Value to a public int Property on my ViewModel  and then on a parent User control (several levels up the chain) I added a d:DesignContext="{d:DesignInstance SomeValidViewModel}". The result: Visual Studio immediately crashed. My other piece of advice is: if you're going to use design time data context's then set them on every UserControl in your chain starting at the lowest and working you way up. Had I done that the problem would have been much easier to find.