Back to Devexpress

ComboBoxEditBase.DropDownIcon Property

maui-devexpress-dot-maui-dot-editors-dot-comboboxeditbase.md

latest2.3 KB
Original Source

ComboBoxEditBase.DropDownIcon Property

Gets or sets the custom drop-down icon image. This is a bindable property.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public ImageSource DropDownIcon { get; set; }

Property Value

TypeDescription
ImageSource

The icon image.

|

Remarks

The drop-down icon is an icon that appears on the right side of the ComboBoxEdit when the drop-down list is collapsed. Use the IsDropDownIconVisible property to change the visibility of the drop-down icon.

To set a custom image for the drop-down icon, follow the steps below:

  1. Add the icon file (for example, icon.svg) to the Resources/Images folder. Make sure that its build action is set to MauiImage.

  2. Assign the icon to the DropDownIcon property:

If you want to specify a custom drop-up icon, set the DropDownIcon property to a custom image when the drop-down list is open. To track the drop-down list state, check the value of the IsDropDownOpen property.

The example below shows how to replace the DropDownIcon property value at run time if you use custom styles and triggers:

xaml
<Style TargetType="dxe:ComboBoxEdit">
  <Setter Property="DropDownIcon" Value="custom_drop_down"/>
  <Style.Triggers>
      <Trigger TargetType="dxe:ComboBoxEdit" Property="IsDropDownOpen" Value="True">
        <Setter Property="DropDownIcon" Value="custom_drop_up"/>
      </Trigger>
  </Style.Triggers>
</Style>

See Also

ComboBoxEditBase Class

ComboBoxEditBase Members

DevExpress.Maui.Editors Namespace