RootItem Image

4 posts, 0 answers
  1. Wang
    Wang avatar
    42 posts
    Member since:
    Oct 2011

    Posted 13 May Link to this post

    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?

     

  2. Wang
    Wang avatar
    42 posts
    Member since:
    Oct 2011

    Posted 13 May Link to this post

    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>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 16 May Link to this post

    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.
  5. Wang
    Wang avatar
    42 posts
    Member since:
    Oct 2011

    Posted 16 May in reply to Kiril Vandov Link to this post

    Thanks a lot ! I will check the code where was wrong later.
Back to Top