Caliburn Micro with blendability

May 1, 2011 at 10:28 PM

I'm using CM for a project that I switched from MVVM light.  I really liked being able to mock up data and see what it looks like in the IDE or Blend.  I added a ViewModelLocator to my CM project and hooked everything up so it will display my design time data.  It works fine and the worst case is I'll probably have to remove the setting of the DataContext.  If I set the d:DataContext will CM ignore it and work as it should?

May 2, 2011 at 2:11 PM

CM doesn't have access to d:DataContext (it is stripped out by the compiler I believe) so setting that won't mess anything up.

Jun 29, 2011 at 1:54 PM

Would it be worth having a way, possibly by naming, to have make CM force a convention?  So, say I have a ListBox x:Name="Customers" and I'm using a method to mock the data, like above, so I'm setting the ItemsSource binding in XAML.  So, CM will ignore applying a convention.  Not a big deal for a TextBlock or something but with a ListBox binding to mocked data means the SelectedCustomer convention won't work, I believe.  So, by naming the ListBox x:Name="*Customers" the conventions are applied regardless if the binding is set.