Add Image To RadOutlookBarItem In Code Behind

2 posts, 0 answers
  1. Kevin Marois
    Kevin Marois avatar
    16 posts
    Member since:
    May 2010

    Posted 15 Jan 2012 Link to this post

    I am trying to set up RadOutlookBarItems in the code behind. I want to add an icon to each section so far I have this:

    private void addOutlookBarSections()
        Sections = new ObservableCollection<RadOutlookBarItem>();

    RadOutlookBarItem projects = new RadOutlookBarItem();
        projects.Header = "Projects";
        BitmapImage projectsIcon = new BitmapImage(new Uri("media/images/project_24.png", UriKind.Relative));
        projects.Icon = projectsIcon;
        RadOutlookBarItem clients = new RadOutlookBarItem();
        clients.Header = "Clients";
        BitmapImage clientsIcon = new BitmapImage(new Uri("media/images/person_24.png", UriKind.Relative));
        clients.Icon = clientsIcon;

    It runs and the sections are there, but the icons are not. The icons are included in the project, What's the right way to do this?

  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 18 Jan 2012 Link to this post

    Hello Kevin,

    I am not sure how you're using the Sections collection to populate the RadOutlookBar with items and this is why I attached a sample project where I used your code snippet to populate directly the RadOutlookBar.Items collection and it works as expected on our side. Can you please give it a try and let me know if it works for you or if I'm missing something from your approach

    Kind regards,
    Tina Stancheva
    the Telerik team

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

Back to Top