Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Hit Information

Like other DevExpress .NET WinForms controls the Layout Control allows you to identify which element of the control is located under a specific point. For instance, this is useful if you need to respond to clicking a specific visual element (a particular layout item, tab page, etc).

To identify an element under a test point, you can call the LayoutControl.CalcHitInfo method.

You can also handle the LayoutControl.PopupMenuShowing event to perform specific actions when a Layout Control is right-clicked (Note that this event will not fire if a control displayed within a layout item is right-clicked). In this instance, the event’s HitInfo parameter identifies an element under the clicked point.

The HitInfo parameter and the LayoutControl.CalcHitInfo method return an object of the BaseLayoutItemHitInfo class. The BaseLayoutItemHitInfo.Item property will specify the type of the item that has been clicked. The BaseLayoutItemHitInfo.HitType property will specify the type of the item’s element

#Member Table