Icons doesn't appears with their correct size?

9 posts, 0 answers
  1. Julien
    Julien avatar
    236 posts
    Member since:
    Jul 2010

    Posted 25 Aug 2010 Link to this post

    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
  2. Chris Andrews
    Chris Andrews avatar
    41 posts
    Member since:
    Mar 2010

    Posted 10 Nov 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 11 Nov 2010 Link to this post

    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
  5. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 10 Jan 2011 Link to this post

    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
  6. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 11 Jan 2011 Link to this post

    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>>
  7. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 11 Jan 2011 Link to this post

    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
  8. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 12 Jan 2011 Link to this post

    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>>
  9. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 12 Jan 2011 Link to this post

    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
  10. Stefan
    Stefan avatar
    14 posts
    Member since:
    Dec 2010

    Posted 31 Jan 2011 Link to this post

    Had the same issue as Buzz.  His fix work for me.  I am using Visual Studio 2010.
Back to Top
UI for WPF is Visual Studio 2017 Ready