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

RadBreadcrumItem Container Style Does Not Work

2 Answers 47 Views
BreadCrumb
This is a migrated thread and some comments may be shown as answers.
reg
Top achievements
Rank 1
reg asked on 12 Jun 2012, 03:07 PM
Hi,

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...

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

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

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

Thanks

2 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 13 Jun 2012, 02:44 PM
Hello reg,
The problem with your code is that the target type should be RadBreadcrumbBarItem instead of RadBreadcrumbItem (the barItems are the real containers):
xmlns:breadcrumb="clr-namespace:Telerik.Windows.Controls.Breadcrumb;assembly=Telerik.Windows.Controls.Navigation"
...
<telerik:RadBreadcrumb>
    <telerik:RadBreadcrumb.ItemContainerStyle>
        <Style TargetType="{x:Type breadcrumb:RadBreadcrumbBarItem}">
            <Setter Property="Image" Value="{StaticResource Folder16}" />
        </Style>
    </telerik:RadBreadcrumb.ItemContainerStyle>
</telerik:RadBreadcrumb>
If you have more questions please feel free to ask.

Regards,
Zarko
the Telerik team

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

0
reg
Top achievements
Rank 1
answered on 17 Jun 2012, 10:30 PM
Many thanks, that fixed it.
Tags
BreadCrumb
Asked by
reg
Top achievements
Rank 1
Answers by
Zarko
Telerik team
reg
Top achievements
Rank 1
Share this question
or