Version

TaskDialogDisplaying Event

Fired before the TaskDialog is displayed.
Syntax
'Declaration
 
Public Event TaskDialogDisplaying As TaskDialogDisplayingHandler
public event TaskDialogDisplayingHandler TaskDialogDisplaying
Event Data

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

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
Dialog Returns a reference to the TaskDialog that will be displayed if the event is not canceled.
IsExistingTask Returns a boolean value indicating whether the Task is already associated with the UltraCalendarInfo instance firing the event.
Task (Inherited from Infragistics.Win.UltraWinSchedule.CancelableTaskEventArgs) 
Example
This sample code illustrates the handling of Task dialog displaying event to get reference to the initiated task.

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 Infragistics.Win.UltraWinGanttView
Imports Infragistics.Win.UltraWinSchedule

Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) 
        
    AddHandler Me.ultraGanttView1.TaskDialogDisplaying, AddressOf ultraGanttView1_TaskDialogDisplaying 

End Sub 

Private Sub ultraGanttView1_TaskDialogDisplaying(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGanttView.TaskDialogDisplayingEventArgs) 
    
     ' Get Reference to the Task that invoked the dialog 
     Dim taskInDialog As Task = e.Task 

End Sub
using Infragistics.Win.UltraWinGanttView;
using Infragistics.Win.UltraWinSchedule;

 private void button1_Click(object sender, EventArgs e)
 {
    this.ultraGanttView1.TaskDialogDisplaying += new Infragistics.Win.UltraWinGanttView.TaskDialogDisplayingHandler(ultraGanttView1_TaskDialogDisplaying);
  
 }

 void ultraGanttView1_TaskDialogDisplaying(object sender, Infragistics.Win.UltraWinGanttView.TaskDialogDisplayingEventArgs e)
 {
    // Get Reference to the Task that invoked the dialog
    Task taskInDialog = e.Task;

 }
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