Question

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

Posted 7 years ago by Avatar Stephen Starkie
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 7 years ago by Actipro Software Support - Cleveland, OH, USA
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 4 years ago by recthor

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.

Information The latest build of this product (2017.2 build 0664) was released 5 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.