Skip to main content

When To Show a Hint

The DevExpress Hint can be displayed in two ways.

  • In response to user interaction by specifying the HintSettings.TriggerAction property in the HTML markup.

    @Html.DevExpress().Hint(
        settings => {
            settings.Name = "hint";
            settings.TargetSelector = ".myImage";
            settings.TriggerAction = HintTriggerAction.Click;
        }).GetHtml()
    
  • Programmatically on the client using the ASPxClientHintOptions.triggerAction property in the ASPxClientHint.Register client-side method.

    <img src="~/Content/myImage.png" class="myImage">
    
    @Html.DevExpress().Button(
        settings => {
            settings.ClientSideEvents.Click = "function(s, e) { ASPxClientHint.Register('.myImage', { content: 'sample content', triggerAction: 'hover'} ); }";
            settings.Name = "button1";
            settings.Text = "Button";
            settings.Width = 80;
        }).GetHtml()
    
See Also