Background brushes don't work

Ribbon for WPF Forum

Posted 10 years ago by Jon von Gillern
Version: 10.1.0515
Platform: .NET 3.5
Environment: Windows 7 (64-bit)
Avatar
Its probable that I'm just "missing something". But it is my expectation that when I change the background brush on a ribbon group presenter or a ribbon group, that the control will be painted with the specified brush. This doesn't seem to happen with the ribbon controls, am I supposed to edit them somewhere else?

<DockPanel Background="Pink">
    <ribbon:GroupPresenter DockPanel.Dock="Top" Background="Blue"  >
        <ribbon:Group Label="Project" IsCollapsible="False" Background="Black">
            <ribbon:Button Label="New"  />
            <ribbon:Button Label="Open" Background="Purple" />
        </ribbon:Group>
    </ribbon:GroupPresenter>
</DockPanel>
If I edit the background on the DockPanel that host the group presenter, it seems to be visible in the background of the group presenter, ribbon buttons seem to work as expected. So it is almost as if GroupPresenter and Group are "stuck" on being transparent.

This is the result of the above xaml: http://imgur.com/qaarH

Comments (1)

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

Sorry but GroupPresenter doesn't have any custom Style/Template definition so it's just pulling in whatever it inherits from the native WPF Selector control. You can surround it with a Border if you wish to give it customized UI.

Also I checked the code and Group doesn't currently use the Background property. I've updated the Group template to use Background for the next maintenance release.


Actipro Software Support

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.