Skip to main content
All docs
V24.1

DxHtmlElement.Focus(Boolean) Method

Gets or sets whether this element is focused. Focused elements are styled with the “main_class_name:focus” CSS pseudo-class.

Namespace: DevExpress.Utils.Html

Assembly: DevExpress.Data.Desktop.v24.1.dll

NuGet Packages: DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design

Declaration

public virtual bool Focus(
    bool value
)

Parameters

Name Type Description
value Boolean

true to focus the element and apply the “:focus” CSS pseudo-class; false to unfocus the element and apply the regular CSS style.

Returns

Type Description
Boolean

true if the item was successfully focused; otherwise, false.

See Also