Hello,
I have a problem about BreadCrumb Sample,when I set the default Path to the root,
the BreadCrumb did't show the root Image.how can I fix it?
3 Answers, 1 is accepted
In the sample,I set the path to "RootPath" in the xaml. the did't show the root Image,when I select other path and select rootpath again,the Image will show correctly.
<telerik:RadBreadcrumb x:Name="explorerBreadcrumb"
Grid.Row="0"
CurrentItemChanged="explorerBreadcrumb_CurrentItemChanged"
Header="{Binding Root}"
HeaderMemberPath="Name"
HierarchicalItemsSource="Children"
HierarchicalMemberPath="Name"
ImagePath="Image"
IsIconVisible="True"
ItemsSource="{Binding Root.Children}"
Path="RootPath"
TextModePath="Name" />
<Border Grid.Row="1" BorderThickness="1" Margin="0 5 0 0" BorderBrush="#FFD7D5D5">
<telerik:RadTreeView x:Name="explorerTree"
Margin="0 3 0 0"
ItemsSource="{Binding Items}"
SelectionChanged="explorerTree_SelectionChanged"
SelectionMode="Single"
telerik:TextSearch.TextPath="Name">
<telerik:RadTreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</telerik:RadTreeView.ItemTemplate>
</telerik:RadTreeView>
</Border>
The RadBreadCrum displays the image of its items based on the ImagePath property and the value set in it. In your case the BreadCrumb will try to find an Image property in your ViewModel and get the value for the image from there. If the Value is not set or the path is incorrect the image will not be displayed. My guess is that issue in somewhere in your ViewModel. You can find a codesnippets in our online documentation.
I hope this information helps.
Regards,
Kiril Vandov
Telerik