Ribbon bitmaps are jagged after switching to .NET 4.0

Ribbon for WPF Forum

Posted 10 years ago by Chris
Version: 10.1.0522
Avatar
We recently switched our project from .NET 3.5 to 4.0 and noticed that our ribbon images are looking very jagged as if they weren't anti-aliased. They are 256x256 PNG files so they should be high enough resolution. We use the ribbon, property grid, dock, syntax editor and wizard in our project. We upgraded to the v10.1.522 build to make sure it wasn't something recently fixed. Does anyone know why this would be happening?

Comments (3)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Chris,

.NET 4.0 is supposed to have code to make images align to pixels better, which should generally help if anything. However you said you are using 256x256 images in your ribbon. That is never a good idea because then they will be scaled down and will not be nearly as clear as using 16x16 and 32x32 images in the appropriate large/small image sources.

I'd always recommend using images designed for 16x16 or 32x32 in ribbon and other places in your app that take those sizes of images. A 256x256 image scaled down to 16x16 or 32x32 would look horrible in any of those spots regardless of which .NET framework you target.


Actipro Software Support

Posted 10 years ago by Chris
Avatar
Thanks for the response. Not all of the images are 256 (some smaller) and it rendered beatifully under .NET 3.5. Another component developer has confirmed that .NET 4.0 uses a lower sampling rate on their images so that explains the difference. We noticed the problem on a standard listview. That's a shame - we'll have to create anti-aliased versions or each size in the application. I just wanted to let anyone else know that this isn't specifically an Actipro problem.
Posted 10 years ago by Chris
Avatar
For those of you following or experiencing this problem, my wonderful architect found a solution. You must add the following to your XAML (WPF apps):

RenderOptions.BitmapScalingMode="HighQuality"


Apparently, this is a 4.0 framework optimization that burned us. Now our regular listboxes and the ActiPro ribbon display our images correctly.
The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.