Version

Configuring the Legend

Topic Overview

Purpose

This topic provides information about the Legend feature of the WinGanttViewPrintDocument™ component.

Required background

The following table lists the topics required as a prerequisite to understanding this topic.

Topic Purpose

This topic introduces the features of the WinGanttViewPrintDocument™ component.

Legend’s Configurable Elements

Introduction

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.

Configurable elements overview

The following table summarizes the visual elements of the Legend. Additional details are available after following the summary table.

Visual element Description

Details Area

Used to place any arbitrary text. This area also allows for replacement codes which provide document-specific or user-specific information

Key Area

Displays a graphical key for the end user to identify the bars on the timeline section of the WinGanttView.

Details Area

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

Key Area

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

Legend Customizations

Legend Customizations Summary

The following table lists the configurable aspects of the Legend.

Area Configurable aspects Details Properties

Details Area

Appearance

The appearance of the Details Area can be configured.

Appearance

Text position

The position of the text displayed in the Details Area can be configured.

Width

The width of the details area can be configured.

Key Area

Appearance

The appearance used to render the key area can be configured.

Appearance

Legend Property Reference

Introduction

The main properties managing the Legend are listed below. They belong to the LegendSettings object.

Legend property reference chart

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).

Property name Description Property type Default value

Appearance

Appearance settings to render the Legend.

AppearanceBase

Not set

Properties specific to Details Area such as Appearances, where to display text within the details area etc.

Infragistics.Win.UltraWinGanttView.DetailsAreaSettings

Not set

Sets the width of the Details Area of the Legend, in inches.

float

2 inches

Properties specific to Key Area such as Appearance settings.

Infragistics.Win.UltraWinGanttView.KeyAreaSettings

Not set

Sets the location of the Legend in the printed document, (i.e. on what page(s)).

The valid settings are:

  • Never – no legend is displayed on any page.

  • OnEveryPage – the legend appears at the bottom of every page. This is the default.

  • OnTheLegendPage – The legend displays only once, on a separate dedicated page, after all of the GanttView content has been printed.

Note
Note:

In Microsoft® Project, each printed page leaves a space for the legend, even when the print option is set to OnTheLegendPage. With UltraGanttView, the entire height of the page will be used to display the contents of the GanttView component.

  • OnBottomOfLastVerticalPage – The legend displays only on each horizontal page in the last vertical row of pages.

Note
Note:

If the last page has content such that the legend will not fit, the legend will print alone on a separate page.

Infragistics.Win.UltraWinGanttView.ShowLegend

OnEveryPage

Setting Up a Sample Legend – Code Example

Description

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.

Preview

The following picture demonstrates the Legend as customized by the sample code.

Configuring the Legend 1.png

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;
----

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic introduces the features of the WinGanttViewPrintDocument™ component.

This topic explains how to use the Print Preview feature of the WinGanttViewPrintDocument™. In the particular example in this topic, the WinGanttViewPrintDocument™ is used with the WinPrintPreviewDialog™ to print preview the WinGanttView™ control.

This topic explains, with code examples, how to customize the Print Version of the WinGanttView control using the InitializeGanttView event.