Using xaml DrawingImage as ImageSource

Navigation for WPF Forum

Posted 15 years ago by Andy Ver Murlen
I have a bunch of xaml images that I am using as icons, which are rather large without any height and width applied to them (like 200 x 200 large). The icons are in resource dictionaries and are ImageDrawing format. I am using them for the ImageSourceLarge and ImageSourceSmall in a navigation pane.

<DrawingImage x:Key="MyIcon" />

     ImageSourceLarge="{StaticResource MyIcon}"
     ImageSourceSmall="{StaticResource MyIcon}"
I have a couple issues that I can't seem to solve...

1. When displayed in the large buttons, the image is displayed at 32x32, but I can't figure out a way to apply a margin to it to move it away from the button edges.

2. The image looks great in the tray at 16x16, however, in the popup buttons there is no sizing placed on them, so they are HUGE. I can't seem to figure out how to limit the size of them to 16x16. An extension of this question is why aren't they limited to 16x16 by default like the tray buttons?

How can I effectively use xaml icons (the preferred WPF way, mind you) for my image sources? It seems rather anti-wpf to have to use pngs.


[Modified at 03/02/2009 11:33 AM]

[Modified at 03/02/2009 01:28 PM]

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi, we've corrected these issues for the upcoming maintenance release. You'll be able to set NavigationPane.Padding to add space between the large icons and the border, and all menu item images will be scaled to 16x16. Thanks for the post!

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.