Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8459199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:16:25+00:00 2026-06-10T13:16:25+00:00

I am having a problem displaying the context menu RadContextMenu with Icon, I am

  • 0

I am having a problem displaying the context menu RadContextMenu with Icon, I am using dynamic binding to observable collection, which contains context menu items (Text and Icon), I am following this tutorial “Dynamic Binding“, following is my XAML

<!-- Context Menu Resources Start-->
    <Style x:Key="MenuItemStyle" TargetType="{x:Type telerik:RadMenuItem}">
            <Setter Property="Icon">
                <Setter.Value>
                    <Image Source="{Binding IconPath, Converter={StaticResource pathtoimage}}" />
                </Setter.Value>
            </Setter>
        </Style>

        <HierarchicalDataTemplate x:Key="MenuItemTemplate">
            <telerik:RadButton Content="{Binding Title}" HorizontalContentAlignment="Left" Background="Transparent" BorderBrush="Transparent" />
        </HierarchicalDataTemplate>

<!-- Context Menu Resources End -->

and following is the XAML of RadGridView, on which context menu is placed.

<telerik:RadGridView x:Name="myGridView" AutoGenerateColumns="False" ItemsSource="{Binding GridData}" VerticalAlignment="Top">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Result}" Header="Result"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Category}" Header="Category"/>
        </telerik:RadGridView.Columns>
        <telerik:RadContextMenu.ContextMenu>
            <telerik:RadContextMenu ItemsSource="{Binding ContextMenuItems}" ItemContainerStyle="{StaticResource MenuItemStyle}" ItemTemplate="{StaticResource MenuItemTemplate}">                 
            </telerik:RadContextMenu>

View Model is as follows

class MainViewModel
{
    private ObservableCollection<MenuItemObj> menuitems_;
    public ObservableCollection<MenuItemObj> ContextMenuItems
    {
        get
        {
            return menuitems_;
        }
        set
        {
            menuitems_ = value;
        }
    }

    private ObservableCollection<GridRowDataObj> griddata_;
    public ObservableCollection<GridRowDataObj> GridData
    {
        get
        {
            return griddata_;
        }
        set
        {
            griddata_ = value;
        }
    }
}

public class MenuItemObj
{
    public string Title { get; set; }
    public string IconPath { get; set; }
}

public class GridRowDataObj
{
    public string Result { set; get; }
    public string Category { set; get; }
}

and setting DataContext as

//TODO
        ObservableCollection<GridRowDataObj> gd = new ObservableCollection<GridRowDataObj>();
        gd.Add(new GridRowDataObj() { Result = "Primary School", Category = "SSC" });
        gd.Add(new GridRowDataObj() { Result = "Higher School", Category = "HSSC" });
        gd.Add(new GridRowDataObj() { Result = "Higher School", Category = "HSSC" });

        //TODO
        ObservableCollection<MenuItemObj> mi = new ObservableCollection<MenuItemObj>();
        mi.Add(new MenuItemObj() { Title = "My Item 1", IconPath = "/Images/item1.png" });
        mi.Add(new MenuItemObj() { Title = "My Item 2", IconPath = "/Images/item2.png" });
        mi.Add(new MenuItemObj() { Title = "My Item 3", IconPath = "/Images/item3.png" });

        MainViewModel mvm = new MainViewModel();
        mvm.ContextMenuItems = mi;
        mvm.GridData = gd;

        this.DataContext = mvm;

But when I run the code, this is what I get

Output of code

I am not sure why the icons for first and second menu items are not displayed, I have checked that the icon is displayed for last menu item only. I have complete project replicating this scenario, if any one need it he/she can ask for?, Please help me out?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:16:27+00:00Added an answer on June 10, 2026 at 1:16 pm

    I posted the question on Telerik support forum and got a working solution here,

    RadContextMenu icon issue

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im having a problem with removing non-utf8 characters from string, which are not displaying
I'm having a problem displaying data from a function to text box within a
I am having a very strange problem with pound signs displaying incorrectly (or not
I am having problem using mvc:resources in spring 3.1 configuration. Initially i was working
I am having problem in displaying Tiff images in browser.I have my images stored
I'm having a problem with CSS not displaying correctly between IE and Firefox... The
I'm having a problem refreshing text on a timer. I am displaying the current
I am having problem of displaying PNG image where as JPG image is Displaying
I am having problem displaying the modal dialog in mvc3 project, I found the
I'm coding a Wordpress theme and I'm having an issue displaying 5 dynamic post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.