The requested page is not available for the requested platform. You are viewing the content for Default platform.

ToolTipAttribute Class

Specifies the tooltip that is displayed for the target class' objects.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class ToolTipAttribute :
    ModelExportedValuesAttribute
<AttributeUsage(AttributeTargets.Property Or AttributeTargets.Field, Inherited:=True, AllowMultiple:=False)>
Public Class ToolTipAttribute
    Inherits ModelExportedValuesAttribute

Remarks

You can specify the tooltip for your business class' property via the ToolTipAttribute or the IModelToolTip.ToolTip property of the BOModel | <Class> | OwnMembers | <Member> node in the Model Editor. Mobile applications do not support this functionality.

Once set for a class member, the tooltip value is automatically calculated for all related UI elements - List View column headers, controls of Detail View items, as well as for layout groups and captions of layout items (you can customize tooltips for these elements in the Application Model as well).

You can also specify a tooltip using the ToolTip property for a navigation group or item node under the NavigationItems node in the Model Editor. This has no effect for groups in WinForms Navigation Bar with Outlook Style.

In the code below, the ToolTipAttribute is applied to the Task.Contacts property and the ToolTipAttribute.ToolTip text is specified.

public class Task : BaseObject {
    // ...
    [ToolTip("View, assign or remove contacts for the current task")]
    public XPCollection<Contact> Contacts {
        get {
            return GetCollection<Contact>("Contacts");
        }
    }
    // ...
}

The result is demonstrated below.

Windows Forms Application:

TooltipSimple_Win

ASP.NET Application:

TooltipSimple_Web

In Windows Forms applications, additional ToolTipAttribute.ToolTipTitle and ToolTipAttribute.ToolTipIconType parameters have effect in Detail Views.

TooltipAdvanced_Win

Alternatively, you can configure tooltips in the Model Editor. For instance, this approach is useful when you cannot modify the required property implementation in code.

TooltipAdvanced_ME

You can see an example of using the ToolTipAttribute attribute in the MainDemo application that is shipped with XAF and installed to %PUBLIC%\Documents\DevExpress Demos 19.1\Components\eXpressApp Framework\MainDemo, by default.

Inheritance

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