Image of the BreadcrumbItem (dpi resolution)

Navigation for WPF Forum

Posted 14 years ago by Radu
Avatar
Hi

We are using some PNGs as BreadcrumbItem's Images and I noticed _some of them_ are displayed like 33% bigger than the original image (stretched up).
I specify the ImageSource via Style trigger, the correct way.

I identified the problem being caused by the images that have 72dpi. The 96dpi are displayed properly, but the 72dpi ones are stretched up.

An explanation and a possible solution I found here:

http://genesisconduit.wordpress.com/2008/07/05/wpf-images-and-dpi-independence/

Do you think it would be possible for you to offer this switch for the BreadcrumbItem Image? Something like a property called ScalingBehavior (DpiAdjusted or OriginalPixelSize)?

If it does not make sense for you to add this, it is fine, we can rescale all our images to 96dpi, but I considered to ask first... maybe there are some other users also interested...

[Modified at 01/21/2010 05:46 AM]

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Radu,

We've marked down a TODO item to research this more, but won't be making a change at this time. The link you posted might work in your particular situation, but only applies to BitmapSource-dervied image sources.

Even with those types, there could be problems. The PixelWidth/PixelHeight are not dependency properties, nor does the parent class implement INotifyPropertyChanged. So if these properties ever change (if they even ever would), then our image display would not update correctly.

There are too many unknowns to make this type of change the default right now. You could however take our default Styles for BreadcrumbItem and make that sort of change yourself.


Actipro Software Support

Posted 14 years ago by Radu
Avatar
You are right.

Thanks for the hint with the styles, we'll use that.
The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.