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

RootItem Image

3 Answers 67 Views
BreadCrumb
This is a migrated thread and some comments may be shown as answers.
Wang
Top achievements
Rank 1
Wang asked on 13 May 2016, 06:34 AM

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

Sort by
0
Wang
Top achievements
Rank 1
answered on 13 May 2016, 06:42 AM

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>

0
Kiril Vandov
Telerik team
answered on 16 May 2016, 10:27 AM
Hello Wang,

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
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Wang
Top achievements
Rank 1
answered on 17 May 2016, 02:47 AM
Thanks a lot ! I will check the code where was wrong later.
Tags
BreadCrumb
Asked by
Wang
Top achievements
Rank 1
Answers by
Wang
Top achievements
Rank 1
Kiril Vandov
Telerik team
Share this question
or