How to get "Icon" to support FrameworkElements?

2 posts, 0 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 04 Feb 2010 Link to this post

    Is there any way to change the "Icon" property of the RadOutlookBarItem to a generic ContentPresenter instead of an Image?

    In my application, we have spent considerable effort "drawing" our icons in xaml so that they can be resized easily and to use them here would require us to convert them to an image which would be a waste...

  2. Kiril Stanoev
    Kiril Stanoev avatar
    1508 posts

    Posted 05 Feb 2010 Link to this post

    Hi Rob,

    Unfortunately you cannot change the type of the Icon property. Instead you will have to add an additional property to your business object that will store the xaml icon. Then you can specify a DataTemplate and put a ContentPresenter that will be bound to the property holding the icon.

    public class MyBussinessObject
        public object XamlIcon { get; set; }
        public object Header { get; set; }

    <DataTemplate x:Key="MyItemTemplate">
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            <ContentPresenter Content="{Binding XamlIcon}" />
            <ContentPresenter Content="{Binding Header}" Grid.Column="1" />
    <telerikNavigation:RadOutlookBar x:Name="outlookBar1" ItemTemplate="{StaticResource MyItemTemplate}" />

    Let me know if this is a possible solution to your scenario. If you have additional questions or comments, I'd be glad to further assist you.

    Kind regards,
    Kiril Stanoev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. DevCraft R3 2016 release webinar banner
Back to Top