Version

AppointmentToolTipDisplaying Event

Fired before a tooltip is displayed for an appointment.
Syntax
'Declaration
 
Public Event AppointmentToolTipDisplaying As AppointmentToolTipDisplayingHandler
public event AppointmentToolTipDisplayingHandler AppointmentToolTipDisplaying
Event Data

The event handler receives an argument of type AppointmentToolTipDisplayingEventArgs containing data related to this event. The following AppointmentToolTipDisplayingEventArgs properties provide information specific to this event.

PropertyDescription
Appointment Returns the Appointment whose tooltip is to be displayed.
AppointmentElement Returns the associated AppointmentUIElement.
Area Returns a constant which describes the area within the AppointmentUIElement over which the cursor is currently hovering
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
ToolTipInfo (Inherited from Infragistics.Win.UltraWinSchedule.ToolTipEventArgs)Returns or sets the ToolTipInfo structure that contains information about the tooltip about to be displayed.
Remarks

To make it easier for the end developer to customize the tooltip behavior, the AppointmentToolTipDisplaying fires whenever the user hovers over an AppointmentUIElement. The event fires regardless of the value of the AppointmentToolTipVisibility property; the ToolTipText property of the ToolTipInfo structure exposed by the event arguments is empty when no tooltip will be displayed by default, but if the end developer changes the value to a non-empty string, the tooltip will be displayed with that string. Conversely, if the ToolTipText property is set to an empty string, the displaying of the tooltip is effectively canceled.

The ToolTipInfo structure exposed by the event arguments also makes it possible to display images, formatted text, or a bolded title. The style of the tooltip can also be modified on a per-display basis; for example, a balloon tip can be displayed conditionally for certain appointments, by changing the appropriate property value of the ToolTipInfo structure.

Example
The following code sample demonstrates how to use the tooltip-related events to prevent all tooltips from appearing:

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports System.Collections.Generic
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

    Public Sub DisableAllToolTips(ByVal control As UltraTimelineView)

        '  Register an event handler for each of the tooltip events
        '  since all the tooltip event args classes derive from
        '  ToolTipEventArgs, they can share the handler.
        AddHandler control.ColumnHeaderToolTipDisplaying, AddressOf Me.OnToolTipDisplaying
        AddHandler control.OwnerHeaderToolTipDisplaying, AddressOf Me.OnToolTipDisplaying
        AddHandler control.ActivityScrollButtonToolTipDisplaying, AddressOf Me.OnToolTipDisplaying
        AddHandler control.AppointmentToolTipDisplaying, AddressOf Me.OnToolTipDisplaying
        AddHandler control.HolidayToolTipDisplaying, AddressOf Me.OnToolTipDisplaying
        AddHandler control.DateTimeIntervalLabelToolTipDisplaying, AddressOf Me.OnToolTipDisplaying
    End Sub

    Private Sub OnToolTipDisplaying(ByVal sender As Object, ByVal e As ToolTipEventArgs)
        e.Cancel = True
    End Sub
using System.Collections.Generic;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

    public void DisableAllToolTips( UltraTimelineView control )
    {
        //  Register an event handler for each of the tooltip events;
        //  since all the tooltip event args classes derive from
        //  ToolTipEventArgs, they can share the handler.
        control.ColumnHeaderToolTipDisplaying += new ColumnHeaderToolTipDisplayingHandler(this.OnToolTipDisplaying);
        control.OwnerHeaderToolTipDisplaying += new OwnerHeaderToolTipDisplayingHandler(this.OnToolTipDisplaying);
        control.ActivityScrollButtonToolTipDisplaying += new ActivityScrollButtonToolTipDisplayingHandler(this.OnToolTipDisplaying);
        control.AppointmentToolTipDisplaying += new AppointmentToolTipDisplayingHandler(this.OnToolTipDisplaying);
        control.HolidayToolTipDisplaying += new HolidayToolTipDisplayingHandler(this.OnToolTipDisplaying);
        control.DateTimeIntervalLabelToolTipDisplaying += new DateTimeIntervalLabelToolTipDisplayingHandler(this.OnToolTipDisplaying);
    }

    private void OnToolTipDisplaying(object sender, ToolTipEventArgs e)
    {
        e.Cancel = true;
    }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also