This topic provides information about the Legend feature of the WinGanttViewPrintDocument™ component.
The following table lists the topics required as a prerequisite to understanding this topic.
This topic contains the following sections:
The legend that the WinGanttViewPrintDocument™delivers in print, consists of two parts:
Details Area
Key Area
Each of them is explained in the text blocks that follow.
The following table summarizes the visual elements of the Legend. Additional details are available after following the summary table.
The Details Area is used to place any arbitrary text. This area also allows for replacement codes which provide document-specific or user-specific information such as:
Start date of the print operation
Start time of the print operation
Current user name
Current page number
Total number of pages
The current vertical page number
The current horizontal page number
The Key Area displays a graphical key for the end user to identify the bars on the timeline section of the WinGanttView. WinGanttView supports the following types:
Task
Progress
Milestone
Summary
Deadline
The following table lists the configurable aspects of the Legend.
The main properties managing the Legend are listed below. They belong to the LegendSettings object.
The following table summarizes the properties of the WinGanttViewPrintDocument component. None of these properties are required for displaying the Legend, but some, if not set explicitly, take certain default values (indicated in the table).
The following code customizes the Legend caption area in the following aspects:
The Legend is shown in the bottom of the last vertical page.
The fore color of the legend is set to blue, so that the text displayed in the legend and the borders of the legend appear blue.
Replacement codes are displayed in the center and right positions of the Details Area.
The width of the Details Area is set and the remaining area is occupied by the Key Area.
The back color of the Key Area is set to blue.
The following picture demonstrates the Legend as customized by the sample code.
In Visual Basic:
----Me.ultraGanttViewPrintDocument1.LegendSettings.ShowLegend = Infragistics.Win.UltraWinGanttView.ShowLegend.OnBottomOfLastVerticalPage
Me.ultraGanttViewPrintDocument1.LegendSettings.Appearance.ForeColor = Color.Blue
Me.ultraGanttViewPrintDocument1.LegendSettings.DetailsAreaSettings.TextCenter = Infragistics.Win.UltraWinGanttView.UltraGanttViewPrintDocument.DatePrintedToken
Me.ultraGanttViewPrintDocument1.LegendSettings.DetailsAreaSettings.TextRight = Infragistics.Win.UltraWinGanttView.UltraGanttViewPrintDocument.TimePrintedToken
Me.ultraGanttViewPrintDocument1.LegendSettings.DetailsAreaWidth = 5
Me.ultraGanttViewPrintDocument1.LegendSettings.KeyAreaSettings.Appearance.BackColor = Color.AliceBlue
----
In C#:
----this.ultraGanttViewPrintDocument1.LegendSettings.ShowLegend = Infragistics.Win.UltraWinGanttView.ShowLegend.OnBottomOfLastVerticalPage;
this.ultraGanttViewPrintDocument1.LegendSettings.Appearance.ForeColor = Color.Blue;
this.ultraGanttViewPrintDocument1.LegendSettings.DetailsAreaSettings.TextCenter = Infragistics.Win.UltraWinGanttView.UltraGanttViewPrintDocument.DatePrintedToken;
this.ultraGanttViewPrintDocument1.LegendSettings.DetailsAreaSettings.TextRight = Infragistics.Win.UltraWinGanttView.UltraGanttViewPrintDocument.TimePrintedToken;
this.ultraGanttViewPrintDocument1.LegendSettings.DetailsAreaWidth = 5;
this.ultraGanttViewPrintDocument1.LegendSettings.KeyAreaSettings.Appearance.BackColor = Color.AliceBlue;
----
The following topics provide additional information related to this topic.