Back to Devexpress

DXButtonBase.DisabledBackgroundColor Property

maui-devexpress-dot-maui-dot-core-dot-dxbuttonbase-28749ca1.md

latest2.9 KB
Original Source

DXButtonBase.DisabledBackgroundColor Property

Gets or sets the background color of the button in the disabled state. This is a bindable property.

Namespace : DevExpress.Maui.Core

Assembly : DevExpress.Maui.Core.dll

NuGet Package : DevExpress.Maui.Core

Declaration

csharp
public Color DisabledBackgroundColor { get; set; }

Property Value

TypeDescription
Color

The background color of the button in the disabled state.

|

Remarks

The button in the disabled state gets its background color from the applied theme or ThemeSeedColor. Use the DisabledBackgroundColor property to apply a custom color, or set the DisabledBackgroundColor property to null to use the original background color:

xaml
<dx:DXButton ...
            Icon="cross"
            DisabledBackgroundColor="{x:Null}"/>

Example

This example shows how to customize button appearance and handle the button click event.

|

Button State

|

Default Appearance

|

Custom Appearance

| | --- | --- | --- | |

Default

|

|

| |

Pressed

|

|

| |

Disabled

|

|

|

  1. Add the clear.png icon file to the Resources/Images folder.

  2. Use the following properties to adjust the button’s appearance and handle the Clicked event to clear label on button tap:

You can also handle the Tap event to specify an action that occurs when a user taps a DXButtonBase descendant. The Tap event allows you to pass additional event data.

See Also

DXButtonBase Class

DXButtonBase Members

DevExpress.Maui.Core Namespace