Back to Devexpress

ColorEdit.ShowDefaultColorButton Property

wpf-devexpress-dot-xpf-dot-editors-dot-coloredit-f17826fa.md

latest4.2 KB
Original Source

ColorEdit.ShowDefaultColorButton Property

Gets or sets whether the Default Color button is visible. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public bool ShowDefaultColorButton { get; set; }
vb
Public Property ShowDefaultColorButton As Boolean

Property Value

TypeDescription
Boolean

true to show the Default Color button ; otherwise, false.

|

Remarks

The default color is specified by the ColorEdit.DefaultColor property. To apply this color, an end-user should press the Default Color button. After the selected color has been changed, the editor fires the ColorEdit.ColorChanged event.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowDefaultColorButton property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-customize-background/CS/MainWindow.xaml#L36

xml
<TextBlock Margin="2" Text="Grid Background"/>
<dxe:ColorEdit x:Name="colorEdit2" ShowDefaultColorButton="False" ShowNoColorButton="True"
    EditValue="{Binding Path=SelectedColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

wpf-spreadsheet-assign-custom-in-place-editors/CS/WpfSpreadsheet_CustomCellEditors/MainWindow.xaml#L434

xml
<dxb:PopupControlContainerInfo>
    <dxe:ColorEdit EditValue="{Binding EditValue, ElementName=biFormatTabColor, Mode=TwoWay}" ShowDefaultColorButton="False" ShowNoColorButton="True" ShowBorder="False" />
</dxb:PopupControlContainerInfo>

wpf-spreadsheet-bind-spreadsheet-to-ms-sql-server-database/CS/WpfSpreadsheet_BindToDataSource/MainWindow.xaml#L436

xml
<dxb:PopupControlContainerInfo>
    <dxe:ColorEdit EditValue="{Binding EditValue, ElementName=biFormatTabColor, Mode=TwoWay}" ShowDefaultColorButton="False" ShowNoColorButton="True" ShowBorder="False" />
</dxb:PopupControlContainerInfo>

wpf-spreadsheet-bind-a-worksheet-to-generic-list-or-bindinglist-data-source/CS/DataBindingToListExample/MainWindow.xaml#L431

xml
<dxb:PopupControlContainerInfo>
    <dxe:ColorEdit EditValue="{Binding EditValue, ElementName=biFormatTabColor, Mode=TwoWay}" ShowDefaultColorButton="False" ShowNoColorButton="True" ShowBorder="False"/>
</dxb:PopupControlContainerInfo>

See Also

ColorEdit Class

ColorEdit Members

DevExpress.Xpf.Editors Namespace