Breadcrumb image on left: how to scale images to fit 16x16

Navigation for WPF Forum

Posted 13 years ago by Stephen Starkie
Avatar
Product version:11.1.540.0
I have images of various sizes coming from my ViewModel for the imageSource in the BreadcrumbItemContainer style, which are not always under the control of my application (user created) and would like to scale them to 16x16 for the breadcrumb control (& breadcrumb menu and combo-boxes etc). What's the best way of going about this?

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Stephen,

We use the native WPF menu, and I don't believe that is designed for anything larger than 16x16. You could restyle/retemplate the 4 places that images are used in the Breadcrumb (including the menu, which might be more involved).

Your best bet would probably be to use a custom IValueConverter to resize the source image. The IValueConverter could use code like the CreateResizedImage from the following blog:


http://blogs.msdn.com/b/delay/archive/2007/11/11/bigger-isn-t-always-better-how-to-resize-images-without-reloading-them-with-wpf.aspx


Actipro Software Support

Posted 11 years ago by recthor
Avatar

i think you can google imaging sdk and you will find many useful tools, or google how to scale images to get instructive articles. i have years of experience in processing images so i can give you some advices. i am using an imaging sdk which can scale images in c# and other formats ,you can have a try.

The latest build of this product (v24.1.1) 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.