Skip to main content
ON

DXColorSelector.ItemsSource Property

Gets or sets the collection of colors that are displayed in the DXColorSelector. This is a bindable property.

Namespace: DevExpress.Maui.Core

Assembly: DevExpress.Maui.Core.dll

NuGet Package: DevExpress.Maui.Core

Declaration

public IEnumerable<Color> ItemsSource { get; set; }

Property Value

Type Description
IEnumerable<Color>

The collection of colors.

Remarks

The following code sample displays a DXColorSelector and binds it to a collection of colors:

<ContentPage ...
             xmlns:local="clr-namespace:ColorSelectorApp"
             xmlns:dx="clr-namespace:DevExpress.Maui.Core;assembly=DevExpress.Maui.Core">
    <ContentPage.BindingContext>
        <local:MainViewModel/>
    </ContentPage.BindingContext>
    <Grid>
        <dx:DXColorSelector ItemsSource="{Binding Colors}"/>
    </Grid>
</ContentPage>
namespace ColorSelectorApp {
    public class MainViewModel {
        public Color[] Colors { get; } = new Color[]{
            Color.FromArgb("#FF0000"),
            Color.FromArgb("#00FF00"),
            Color.FromArgb("#0000FF")
            };
    }
}
See Also