Back to Devexpress

NavElement.Hint Property

windowsforms-devexpress-dot-xtranavbar-dot-navelement-8bfdad3a.md

latest3.1 KB
Original Source

NavElement.Hint Property

Gets or sets the element’s hint text.

Namespace : DevExpress.XtraNavBar

Assembly : DevExpress.XtraNavBar.v25.2.dll

NuGet Package : DevExpress.Win

Declaration

csharp
[DefaultValue("")]
public virtual string Hint { get; set; }
vb
<DefaultValue("")>
Public Overridable Property Hint As String

Property Value

TypeDefaultDescription
StringString.Empty

A string value specifying the text displayed in the element’s hint.

|

Remarks

The NavBarControl control allows hints to be displayed for groups and links(items). Use the Hint property to assign a hint to a group/link. Hints for links are not supported in the VSToolBoxView paint style.

To prevent hints for groups and links from being displayed, use the NavBarControl.ShowGroupHint and NavBarControl.ShowLinkHint properties.

You can also provide hints for links and groups dynamically. To do this, handle the NavBarControl.GetHint event.

Example

The following sample code assigns hints to all items of the NavBarControl. This is performed via the NavElement.Hint property of NavBarItem objects. Item captions are assigned as hint text.

The NavBarControl.ShowLinkHint property is set to true to enable displaying link hints. Review the image below for an example of code execution results.

csharp
using DevExpress.XtraNavBar;
// ...
for (int i = 0; i < navBarControl1.Items.Count; i++) {
   NavBarItem currItem = navBarControl1.Items[i];
   currItem.Hint = currItem.Caption;
}
navBarControl1.ShowLinkHint = true;
vb
Dim I As Integer
For I = 0 To NavBarControl1.Items.Count - 1
   Dim CurrItem As NavBarItem = NavBarControl1.Items(I)
   CurrItem.Hint = CurrItem.Caption
Next
NavBarControl1.ShowLinkHint = True

See Also

Caption

GetHint

NavElement Class

NavElement Members

DevExpress.XtraNavBar Namespace