Application Footer Button Background Color

Ribbon for WPF Forum

Posted 16 years ago by Rick - Developer, Visual Software Systems LLC
Version: 4.5.0485
Avatar
I'm using PixelSnapper to clear-up the image on the footer buttons in the ribbon's application menu. It does the job nicely, but when I wrap the button in the PixelSnapper, the button background turns the color of the Application Menu's frame. Since I'm using the OfficeBalck theme, it's not too friendly.

<ribbon:ApplicationMenu.FooterButtons>
    <shared:PixelSnapper>
        <ribbon:Button Label="Options" ImageSourceSmall="/WpfApplication1;component/Resources/OptionsHS.png" />
    </shared:PixelSnapper>
    <shared:PixelSnapper>
        <ribbon:Button Label="Exit" ImageSourceSmall="/WpfApplication1;component/Resources/Exit.png" />
    </shared:PixelSnapper>
</ribbon:ApplicationMenu.FooterButtons>
The same thing happens if I wrap the buttons in a StackPanel like this:

<ribbon:ApplicationMenu.FooterButtons>
    <StackPanel Orientation="Horizontal" Margin="3">
        <ribbon:Button Label="Options" ImageSourceSmall="/WpfApplication1;component/Resources/OptionsHS.png" />
        <ribbon:Button Label="Exit" ImageSourceSmall="/WpfApplication1;component/Resources/Exit.png" />
     </StackPanel>
</ribbon:ApplicationMenu.FooterButtons>
What am I missing?

Comments (5)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rick,

I think the FooterButtons collection is setting the 'ApplicationMenuFooterButton' Context on those buttons so that they draw differently. You'd have to set it manually if you are using alternate containers like StackPanels instead of having the buttons in the collection directly.

We'd recommend you keep the buttons in there directly though so if you see a spot where pixel snapper needs to be applied, please email over a simple sample project that shows a blurry icon there, and we'll update our styles for the next maintenance release to add in pixel snapper and fix it. Thanks!


Actipro Software Support

Posted 16 years ago by Rick - Developer, Visual Software Systems LLC
Avatar
They definintely look blurry to me. The StackPanel was just an illustration that the background change is not caused by the PixelSnapper. Anyway, I looked at this in more detail while trying to create a small project that replicates the problem. It looks like the 16x16 image is being compressed to a smaller size on the footer button. I say this because if I look at the png in Explorer's tile view or within VS2008, it appears slightly larger, much crisper, with more of the detail visible than when shown on the footer button. I'm fairly new to WPF, but I thought that controls dynamically sized themselves to their content.
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rick,

It depends on whether the controls are configured to dynamically size to their content or not. For Ribbon a lot of times we use fixed image sizes because that is what the Microsoft spec calls for.

If you want to email our support address with your simple repro project we'd be happy to take a look though. I believe footer buttons should be showing the image at proper 16x16 size.


Actipro Software Support

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rick,

Thanks for the sample, we've added a PixelSnapper around the text in the template for the button and that fixes it. This will be in the next maintenance release.


Actipro Software Support

Posted 16 years ago by Rick - Developer, Visual Software Systems LLC
Avatar
I wish all companies I deal with had the same level of customer service as you do. Thank you!
The latest build of this product (v24.1.3) 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.