Caliburn s conventions system is only configured for WPF controls that are out-of-the-box. When it sees the RabTabControl, it doesn t recognize it, so it searched it s class hierarchy looking for something it does recognize. In this case, it probably matches on either Selector or ItemsControl. This is why there is a partial application of conventions. In order to get exactly what you want, you need to add a convention to the ConventionManager for RadTabControl that does exactly what you want. Here is how the TabControl convention is defined:
AddElementConvention<TabControl>(TabControl.ItemsSourceProperty, "ItemsSource", "SelectionChanged")
.ApplyBinding = (viewModelType, path, property, element, convention) => {
if(!SetBinding(viewModelType, path, property, element, convention))
return;
var tabControl = (TabControl)element;
if(tabControl.ContentTemplate == null && tabControl.ContentTemplateSelector == null && property.PropertyType.IsGenericType) {
var itemType = property.PropertyType.GetGenericArguments().First();
if(!itemType.IsValueType && !typeof(string).IsAssignableFrom(itemType))
tabControl.ContentTemplate = DefaultItemTemplate;
}
ConfigureSelectedItem(element, Selector.SelectedItemProperty, viewModelType, path);
if(string.IsNullOrEmpty(tabControl.DisplayMemberPath))
ApplyHeaderTemplate(tabControl, TabControl.ItemTemplateProperty, viewModelType);
};
I think you should be able to take the code and with a few minor modifications, make it do what you want. Note that some of the methods called in the above code actually exist on the ConventionManager, so you will need to fix that up. You should add your convention in your Bootstrapper s Configure override. For an additional sample of this, have a look at the WP7 template s Bootstrapper, which defines custom conventions for Pivot and Panarama.