RadBreadcrumItem Container Style Does Not Work

3 posts, 0 answers
  1. reg
    reg avatar
    6 posts
    Member since:
    Jan 2011

    Posted 12 Jun 2012 Link to this post


    Please could you inform me why I cannot set an ItemContainerStyle for a RadBreadcrumbItem. I thought that I may be able to use a style to set a default image, with the following XAML...

                    <Style TargetType="{x:Type telerik:RadBreadcrumbItem}">
                        <Setter Property="Image" Value="{StaticResource Folder16}"/>

    However, I get the following error at runtime....

    {"'RadBreadcrumbItem' type must derive from FrameworkElement or FrameworkContentElement."}

  2. Zarko
    Zarko avatar
    755 posts

    Posted 13 Jun 2012 Link to this post

    Hello reg,
    The problem with your code is that the target type should be RadBreadcrumbBarItem instead of RadBreadcrumbItem (the barItems are the real containers):
            <Style TargetType="{x:Type breadcrumb:RadBreadcrumbBarItem}">
                <Setter Property="Image" Value="{StaticResource Folder16}" />
    If you have more questions please feel free to ask.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. reg
    reg avatar
    6 posts
    Member since:
    Jan 2011

    Posted 17 Jun 2012 Link to this post

    Many thanks, that fixed it.
Back to Top