I am designing a user control to display a note. So I have a NoteViewModel. In my designer I want to have a test note. So I have the following in my XAML:
<UserControl.Resources>
<local:NoteViewModel x:Key="ViewModel" d:IsDataSource="True">
<local:NoteViewModel.Note>
<localweb:Note
NoteID="1"
CreatedBy="Some Guy"
CreatedDate="2010-01-01 8:00 AM"
Category="Some Category"
NoteText="Some Text"
/>
</local:NoteViewModel.Note>
</local:NoteViewModel>
</UserControl.Resources>
This works great at design time. But at runtime I get errors about not being able to convert "1" to an Int32, and not being able to convert "2010-01-01 8:00 AM" to a DateTime. Why is the designer able to deal with this but not the runtime? How should I change my XAML so that the designer can show the test note but the runtime doesn't crash?