I have a sample Caliburn.Micro project that I am building, and I'm having problems with convention bindings with nested views / view modes.
As an example, suppose I have a ShellView shell view supported by ShellViewModel, which is a screen explorer.
I have a ShellView content control bound to an ActiveItem (using the x: Name convention) and ActiveItem is of type EmployeeListViewModel, so the result is EmployeeListView. Nested in this view is EmployeeDetailsView, supported by EmployeesDetailsViewModel, which is bound to the selected item in the EmployeeListViewModel.
This works just fine, except in EmployeeDetailsView I cannot bind things like text fields and buttons using Caliburn conventions. This works great:
<TextBox Text="{Binding EmployeeID}" />
but none of these lines work:
<TextBox x:Name="EmployeeID" />
<Button x:Name="ClickMethod" />
Linking a text field is not a big deal, but the method of automatically connecting button buttons is one of the coolest things about Caliburn.Micro, but it doesn't work in nested views.
Any ideas?
source
share