Skip to main content
.NET 8.0+

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 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

ToolTipAttribute Class

Specifies a tooltip for a business object property in XAF WinForms, Blazor, and Web Forms applications.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v25.1.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class ToolTipAttribute :
    ModelExportedValuesAttribute

#Remarks

The ToolTipAttribute class allows you specify tooltips for business object properties. Additionally, you can use the Model Editor to configure tooltips for the following elements:

  • Business object properties
  • Layout groups
  • Navigation items and groups

The model uses IModelToolTip.ToolTip, IModelToolTipOptions.ToolTipIconType, and IModelToolTipOptions.ToolTipTitle properties to specify tooltip settings.

#Set a Tooltip for a Business Object Property in Code

Use ToolTipAttribute to assign a tooltip to a class property. Once set for a class member, the tooltip is assigned for all related UI elements:

  • Controls of Detail View items
  • Layout groups
  • Captions of layout items (not supported in Blazor applications)
  • List View column headers in GridListEditor and TreeListEditor (WinForms), DxGridListEditor and DxTreeListEditor (Blazor), ASPxGridListEditor and ASPxTreeListEditor (Web Forms)
public class DemoTask : BaseObject {
    // ...
    [ToolTip("Provide a detailed task description.")]
    public virtual string Notes { get; set; }
    //...
}

Property tooltip

#Set a Tooltip for a Business Object Property in the Model Editor

Select BOModel | <ApplicationName>.Module.BusinessObjects | <ClassName> | OwnMembers | <PropertyName> and specify a value for the ToolTip property.

Property tooltip specified in model editor

You can try this approach in the MainDemo application that is shipped with XAF and installed to the following default path: %PUBLIC%\Documents\DevExpress Demos 25.1\Components\XAF\MainDemo.NET.EFCore.

#Set a Tooltip for a Layout Group in the Model Editor

Select Views | <ApplicationName>.Module.BusinessObjects | <ClassName> | <ClassName>_DetailView | Layout | <…> | <GroupName> and specify a value for the ToolTip property.

Layout group tooltip

#Set a Tooltip for a Navigation Item or Group in the Model Editor

Select NavigationItems | Items | <…> | <GroupOrItemName> and specify a value for the ToolTip property.

Navigation item tooltip

#Limitations

  • ToolTipTitle and ToolTipIconType properties are in effect in Detail Views of XAF Windows Forms applications only.
  • In Blazor applications, tooltips for layout item captions are not supported.
  • In Windows Forms applications, tooltips for navigation groups with Outlook Style are not supported.

#Inheritance

Object
Attribute
DevExpress.Persistent.Base.ModelExportedValuesAttribute
ToolTipAttribute
See Also