Skip to main content
A newer version of this page is available. .

RepositoryItemTokenEdit.ClearCheckStatesOnLostFocus Property

Gets or sets whether checked tokens within the related TokenEdit control should be deselected when the editor loses focus.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v22.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean ClearCheckStatesOnLostFocus { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

true if checked tokens within the related TokenEdit control should be deselected when the editor loses focus; otherwise, false.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

Depending on the RepositoryItemTokenEdit.CheckMode property value, end-users can select (check) one or multiple tokens by clicking their captions. If the ClearCheckStatesOnLostFocus property equals DefaultBoolean.True (or DefaultBoolean.Default), adding new items or driving the focus away from the editor removes the token selection. Otherwise, none of these actions deselects the selected tokens.

If the ClearCheckStatesOnLostFocus property equals DefaultBoolean.False and the RepositoryItemTokenEdit.CheckMode property is set to Multiple, end-users can uncheck currently checked items by clicking their captions again with the Ctrl keyboard key pressed. In Single check mode, once the token is selected, an end-user cannot deselect it unless you remove this token or select another one.

To get all currently checked items use the TokenEdit.CheckedItems collection.

See Also