windowsforms-devexpress-dot-xtrabars-dot-navigation-dot-navigationpane-dot-calchitinfo-x28-system-dot-drawing-dot-point-x29.md
Returns the information for the navigation page that is located at the target coordinates.
Namespace : DevExpress.XtraBars.Navigation
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public INavigationPageBase CalcHitInfo(
Point pt
)
Public Function CalcHitInfo(
pt As Point
) As INavigationPageBase
| Name | Type | Description |
|---|---|---|
| pt | Point |
A Point structure that is the NavigationPane coordinates for which page information should be returned.
|
| Type | Description |
|---|---|
| DevExpress.XtraBars.Navigation.INavigationPageBase |
A DevExpress.XtraBars.Navigation.INavigationPageBase object that contains information about the NavigationPane page located at the target coordinates.
|
The following example demonstrates how to use the CalcHitInfo method to obtain information about the navigation page located at the mouse pointer position:
private void navigationPane1_MouseClick(object sender, MouseEventArgs e) {
var pageInfo = navigationPane1.CalcHitInfo(Cursor.Position);
if (pageInfo != null)
MessageBox.Show(String.Format("You clicked within the '{0}' page.", pageInfo.PageText), "Information", MessageBoxButtons.OK);
}
Private Sub navigationPane1_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim pageInfo = navigationPane1.CalcHitInfo(Cursor.Position)
If pageInfo IsNot Nothing Then
MessageBox.Show(String.Format("You clicked within the '{0}' page.", pageInfo.PageText), "Information", MessageBoxButtons.OK)
End If
End Sub
See Also