I am attempting to use an ItemTemplateSelectorselector with the RadPaneGroup control.
The ItemTemplateSelector is defined as a static resource on the window. It is getting instantiated (tested via breakpoint in constructor) but the DataTemplateSelector.SelectTemplate method is never called. Code for the DataTemplateSelector is below.
<telerik:RadPaneGroup x:Name="RadPaneGroupMain" ItemsSource="{Binding OpenDocuments}" ItemTemplateSelector=" {StaticResource OpenDocumentTemplateSelector}"></telerik:RadPaneGroup>The ItemTemplateSelector is defined as a static resource on the window. It is getting instantiated (tested via breakpoint in constructor) but the DataTemplateSelector.SelectTemplate method is never called. Code for the DataTemplateSelector is below.
internal class ModuleNodeEntityDataTemplateSelector : DataTemplateSelector{ public const string NoModuleEntityEditorTemplateKey = "NoModuleEntityEditorTemplate"; public override DataTemplate SelectTemplate(object item, DependencyObject container) { var containerTyped = (RadPaneGroup)container; return (DataTemplate) containerTyped.Resources[NoModuleEntityEditorTemplateKey]; }}