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

Icons doesn't appears with their correct size?

8 Answers 830 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 25 Aug 2010, 01:28 PM
Hi!

I'm running in a strange exception:

I've created a menu with 4 entry, each are 16x16px large.

But, when i launch the application, I get this:
http://dl.dropbox.com/u/368403/radmenuitemImage.png

Some icons are magnified.

My icons declaration:
<telerik:RadContextMenu.ContextMenu>
    <telerik:RadContextMenu IsEnabled="{Binding MainTree.CurrentItem.IsFolder, Mode=OneWay}" >
        <telerik:RadMenuItem Header="Create new folder" Icon="/GuiResources;component/ActionsIcons/newFolder.png"/>
        <telerik:RadMenuItem Header="Create new file"  Icon="/GuiResources;component/ActionsIcons/newFile.png" />
        <telerik:RadMenuItem Header="Add a new version of this file" Icon="/GuiResources;component/ActionsIcons/newFolder.png" />
        <telerik:RadMenuItem Header="Delete" Icon="/GuiResources;component/ActionsIcons/delete.png" />
    </telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>

Icons are here: http://dl.dropbox.com/u/368403/icons.zip

So:
-why does it happen?
-How to solve it?

Thank you!

Edit: It seems it was my icons that were having a problem

8 Answers, 1 is accepted

Sort by
0
Chris Andrews
Top achievements
Rank 1
answered on 10 Nov 2010, 05:24 PM
Hello,

Were you able to get any responses to this issue.  I am also having the same problem.  The standard WPF ContextMenu works fine but I would like to use telerik controls wherever possible.
0
Konstantina
Telerik team
answered on 11 Nov 2010, 12:00 PM
Hi all,

Thank you for contacting us.

Please use the IconTemplate property to set the icon of the ContextMenu, for example:

<telerik:RadMenuItem Header="Create new folder"
   <telerik:RadMenuItem.IconTemplate
      <DataTemplate
          <Image Source="/GuiResources;component/ActionsIcons/newFolder.png" Stretch="None"
      </DataTemplate
   </ttelerik:RadMenuItem.IconTemplate
</telerik:RadMenuItem>

If you need further assistance please let us know.

Kind regards,
Konstantina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Buzz
Top achievements
Rank 1
answered on 10 Jan 2011, 07:55 PM
See the xaml below.  If I don't set Icon to something, then the IconTemplate doesn't get applied.

<telerik:RadMenuItem  Header="View" Icon="setting Icon or else IconTemplate does nothing" >
    <telerik:RadMenuItem.IconTemplate>
        <DataTemplate>
            <Image Source="{StaticResource viewImage}"/>
        </DataTemplate>
    </telerik:RadMenuItem.IconTemplate>                          
</telerik:RadMenuItem>

I guess that makes some sense.  But is there a better way to set a RadMenuItem's Icon to a StaticResource image?

Buzz
0
Konstantina
Telerik team
answered on 11 Jan 2011, 11:36 AM
Hello Buzz,

I tried to reproduce the issue that you are describing, but to no avail. Please find the attached project in which illustrates my attempt.

Hope this helps. Please let us know if you need further assistance.

Kind regards,
Konstantina
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Buzz
Top achievements
Rank 1
answered on 11 Jan 2011, 03:09 PM
Kostantina,

I tried your example, but I found the same issue.  I had to set the Icon property for the image to show up.
I'm using VS 2008, so I couldn't directly use your project.

I've attached my VS 2008 solution.  Do you see the same problem with this?
I'm using WPF Controls 2010.3.1110

Buzz
0
Konstantina
Telerik team
answered on 12 Jan 2011, 10:18 AM
Hello Buzz,

Please send us the attachment in order to investigate the issue further.

All the best,
Konstantina
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Buzz
Top achievements
Rank 1
answered on 12 Jan 2011, 03:31 PM
Oops.  I forgot to attach my solution, and it looks like I need to submit a support ticket to do that.
Thanks (ticket 383477)
Buzz
0
Stefan
Top achievements
Rank 1
answered on 31 Jan 2011, 03:11 PM
Had the same issue as Buzz.  His fix work for me.  I am using Visual Studio 2010.
Tags
ContextMenu
Asked by
Julien
Top achievements
Rank 1
Answers by
Chris Andrews
Top achievements
Rank 1
Konstantina
Telerik team
Buzz
Top achievements
Rank 1
Stefan
Top achievements
Rank 1
Share this question
or