Back to Devexpress

ToolTipControllerShowEventArgs.HtmlTemplate Property

windowsforms-devexpress-dot-utils-dot-tooltipcontrollershoweventargs-6b9da5e6.md

latest2.1 KB
Original Source

ToolTipControllerShowEventArgs.HtmlTemplate Property

Gets or sets the HTML template that should be used for this specific control.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
public HtmlTemplate HtmlTemplate { get; set; }
vb
Public Property HtmlTemplate As HtmlTemplate

Property Value

TypeDescription
HtmlTemplate

The active HTML template.

|

Remarks

Handle the ToolTipController.BeforeShow event to assign different HTML templates for different controls.

csharp
using DevExpress.Utils;

void OnBeforeShow(object sender, ToolTipControllerShowEventArgs e) {
    if (e.SelectedControl == simpleButton1)
        e.HtmlTemplate = htmlTemplateCollection[1];
    if (e.SelectedControl == simpleButton2)
        e.HtmlTemplate = htmlTemplateCollection[5];
}
vb
Imports DevExpress.Utils

Private Sub OnBeforeShow(ByVal sender As Object, ByVal e As ToolTipControllerShowEventArgs)
    If e.SelectedControl = simpleButton1 Then
        e.HtmlTemplate = htmlTemplateCollection(1)
    End If
    If e.SelectedControl = simpleButton2 Then
        e.HtmlTemplate = htmlTemplateCollection(5)
    End If
End Sub

See Also

ToolTipControllerShowEventArgs Class

ToolTipControllerShowEventArgs Members

DevExpress.Utils Namespace