Back to Devexpress

BarItem.CausesValidation Property

windowsforms-devexpress-dot-xtrabars-dot-baritem-088dc4bb.md

latest2.9 KB
Original Source

BarItem.CausesValidation Property

Gets or sets whether data validation is performed on the currently focused control when clicking on the bar item.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[DXCategory("Behavior")]
public virtual bool CausesValidation { get; set; }
vb
<DefaultValue(False)>
<DXCategory("Behavior")>
Public Overridable Property CausesValidation As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if data validation is performed on the currently focused control when clicking on the bar item; otherwise, false

|

Remarks

If the CausesValidation property is set to true , a click on the bar item invokes the ValidateChildren() method. See this topic in MSDN to learn more.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CausesValidation 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.

xaf-win-custom-action-with-custom-action-control/CS/EFCore/CustomActionEF/CustomActionEF.Win/Controllers/CustomActionControlController.cs#L31

csharp
BarCheckItem barCheckItem = new BarCheckItem(barLinksHolder.Manager);
barCheckItem.CausesValidation = true;
barLinksHolder.AddItem(barCheckItem);

See Also

ValidateChildren()

Validating

BarItem Class

BarItem Members

DevExpress.XtraBars Namespace