Skip to main content
A newer version of this page is available. .

RibbonButtonStyleSettings.PressedForeground Property

Gets or sets a ribbon button’s pressed state foreground. This is a dependency property.

Namespace: DevExpress.WinUI.Ribbon

Assembly: DevExpress.WinUI.Ribbon.v22.1.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(null, Handler = "OnContentChanged")]
public Brush PressedForeground { get; set; }

Property Value

Type Description
Brush

A brush that describes the pressed ribbon button’s foreground.

Remarks

You can use this property to customize the appearance of the following ribbon buttons:

The following code sample changes the RibbonButton‘s PressedBackground, PressedForeground, and HoverBackground colors to green:

<Window ...
    xmlns:dxr="using:DevExpress.WinUI.Ribbon"
    xmlns:dxc="using:DevExpress.WinUI.Core">
      <Grid>
        <dxr:RibbonControl>
            <dxr:RibbonControl.Tabs>
                <dxr:RibbonTab Caption="Home">
                    <dxr:RibbonGroup Caption="File">
                        <dxr:RibbonButton Content="Open" ItemType="SmallWithText">
                            <dxr:RibbonButton.SmallIcon>
                                <dxc:DXSymbolIconSource Symbol="OpenFile" />
                            </dxr:RibbonButton.SmallIcon>
                            <dxr:RibbonButton.StyleSettings>
                                <dxr:RibbonButtonStyleSettings HoverBackground="#3300B25A" 
                                                               PressedBackground="#660E7835" 
                                                               PressedForeground="#FF073B1A" 
                                                               CornerRadius="3"/>
                            </dxr:RibbonButton.StyleSettings>
                        </dxr:RibbonButton>
                    </dxr:RibbonGroup>
                </dxr:RibbonTab>
            </dxr:RibbonControl.Tabs>
        </dxr:RibbonControl>
    </Grid>
</Window>

WinUI RibbonButton - Hovered and Pressed Colors

See Also