Back to Devexpress

SimpleButton.Icon Property

mobilecontrols-devexpress-dot-xamarinforms-dot-editors-dot-simplebutton-f9a8a84c.md

latest2.2 KB
Original Source

SimpleButton.Icon Property

Specifies the button icon image.

Namespace : DevExpress.XamarinForms.Editors

Assembly : DevExpress.XamarinForms.Editors.dll

NuGet Package : DevExpress.XamarinForms.Editors

Declaration

csharp
public ImageSource Icon { get; set; }

Property Value

TypeDescription
ImageSource

The icon image.

|

Remarks

The SimpleButton‘s icon appears to the left of the button’s caption if an image set to the Icon property. Use the IconVisible property to change the visibility of the icon.

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 delete.png icon file to your platform-specific projects:

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

See Also

SimpleButton Class

SimpleButton Members

DevExpress.XamarinForms.Editors Namespace