This is a migrated thread and some comments may be shown as answers.

ItemTemplate and HierarchicalMemberSource

2 Answers 116 Views
BreadCrumb
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 06 Jul 2011, 07:04 PM
Hello,
I have on my page a RadTransition control bind to a CollectionViewSource, which source is an ObservableCollection of ViewModels(VM) in a MVVM implementation. I use PRISM Data Template to select the right control base on the VM currently selected, here's some code snippets:
<UserControl.Resources>
    <DataTemplate x:Key="SelectorDataTemplate" >
        <prism:DataTemplateSelector Content="{Binding}" HorizontalAlignment="Stretch"
                HorizontalContentAlignment="Stretch"
                VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">
                    <prism:DataTemplateSelector.Resources>
                        <DataTemplate x:Key="FirstViewModel">
                            <controls:WebsDisplayControl
                                DataContext="{Binding}" />
                        </DataTemplate>
                        <DataTemplate x:Key="SecondViewModel">
                            <controls:WebsChildrenDisplayControl    
                                DataContext="{Binding}"/>
                        </DataTemplate>
                </prism:DataTemplateSelector.Resources>
 
            </prism:DataTemplateSelector>
        </DataTemplate>
    </UserControl.Resources>

<telerik:RadTransitionControl x:Name="navigatorMainContent"
     Grid.Row="1"
     Content="{Binding ViewSource.View.CurrentItem}"
     ContentTemplate="{StaticResource SelectorDataTemplate}"
     Padding="4">
</telerik:RadTransitionControl>

Now I tried to add a RadBreadCrumb control to the interface that will allow navigate through the hierarchy. Based on the RadBreadcrumb Data binding example from the help, I change my items to be like the ExplorerItem. But now I've got this error when I try to add children to my Root item:
You can't use both ItemTemplate and HierarchicalMemberSource.

Is there a way to bind the breadcrumb to a flat list (as in my ObservableCollection)? Or bind my RadTransition to a HierarchicalMemberSource?

Any help will be appreciated (I'm currently trying to reproduce this issue in an empty project to post it here).

Thanks

2 Answers, 1 is accepted

Sort by
0
Gabriel
Top achievements
Rank 1
answered on 07 Jul 2011, 03:31 AM
Support ticket submitted with full solution (# 441090)
0
Tina Stancheva
Telerik team
answered on 07 Jul 2011, 04:21 PM
Hi Gabriel,

Thanks to your elaborated report we reproduced the issue and found what is causing it. As I posted in the support ticket you sent, a fix will be available with the upcoming official release. In the meantime the item can be tracked from our PITS where you can track its progress.

All the best,
Tina Stancheva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
BreadCrumb
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Gabriel
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or