im having a problem with templates it seems that only the first template is used not the cascaded if i use datatemplateselector it is ignored ( SelectTemplate is never called )
im quite new so maybee im doing something wron if you need more help please contact me
Edit: the ItemSource handling is correct and currentItem is also fine just the visual tree of the nested templates are ignored and this obviously results in binding errors
cheers jan
<
UserControl
xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns
:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns
:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns
:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns
:local="clr-namespace:LibaryTest" xmlns:ViewModel="clr-namespace:LibaryTest.ViewModel"
xmlns
:View="clr-namespace:LibaryTest.View" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns
:Breadcrumb="clr-namespace:Telerik.Windows.Controls.Breadcrumb;assembly=Telerik.Windows.Controls.Navigation"
mc
:Ignorable="d"
x
:Class="LibaryTest.View.ProductionDetailView"
x
:Name="UserControl"
d
:DesignWidth="300" d:DesignHeight="240">
<UserControl.Resources>
<HierarchicalDataTemplate x:Key="ScheduleTemplate">
<TextBlock Text="{Binding DomainObject.ScheduleName}" />
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="RunTemplate" ItemsSource="{Binding ProductionSchedules}" ItemTemplate="{StaticResource ScheduleTemplate}" >
<TextBlock Text="{Binding DomainObject.RunName}" />
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="ProductionTemplate" ItemsSource="{Binding ProductionSchedules}" ItemTemplate="{StaticResource RunTemplate}" >
<TextBlock Text="{Binding DomainObject.ProductionName}" />
</HierarchicalDataTemplate>
<View:NavigationDetailTemplateSelector x:Key="detailSelector"/>
<View:NavigationMasterTemplateSelector x:Key="masterSelector"/>
</UserControl.Resources>
<d:DataContext>
<ViewModel:ProductProductionViewModel />
</d:DataContext>
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="0.05*"/>
<RowDefinition Height="0.95*"/>
</Grid.RowDefinitions>
<telerik:RadBreadcrumb x:Name="navigationView"
Header="{Binding}"
Grid.Row="0"
ItemTemplate="{DynamicResource ProductionTemplate}"
ItemsSource="{Binding ProductProductionRuns}"
IsTextModeEnabled="False"
/>
<!--
ItemTemplateSelector="{DynamicResource masterSelector}"
HeaderTemplateSelector="{DynamicResource masterSelector}"
HeaderTemplate="{DynamicResource RunTemplate}"
ItemTemplate="{DynamicResource ProductionTemplate}"
HeaderTemplate="{DynamicResource ProductionTemplate}"
<TreeView x:Name="navigationView" ItemsSource="{Binding ProductProductionRuns}" Grid.Row="0" ItemTemplate="{DynamicResource RunTemplate}" />
-->
<!--
this is working fine
<ContentControl x:Name="DetailView"
DataContext="{Binding CurrentItem, ElementName=navigationView}"
ContentTemplateSelector="{DynamicResource detailSelector}"
Grid.Row="1"
Content="{Binding DataContext, RelativeSource={RelativeSource Self}}" >
</ContentControl>-->
</Grid>
</
UserControl>