PageLegend Class

Represents a page legend which is used for project printing.
Inheritance Hierarchy
SystemObject
  Aspose.Tasks.VisualizationPageLegend

Namespace:  Aspose.Tasks.Visualization
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public class PageLegend

The PageLegend type exposes the following members.

Constructors
  NameDescription
Public methodPageLegend
Initializes a new instance of the PageLegend class
Properties
  NameDescription
Public propertyCode exampleCenteredImage
Gets or sets the centered image to be displayed in the page legend.
Public propertyCode exampleCenteredText
Gets or sets the centered text to display in the page legend.
Public propertyCode exampleLeftImage
Gets or sets the left aligned image to be displayed in the page legend.
Public propertyCode exampleLeftText
Gets or sets the left aligned text to display in the page legend.
Public propertyCode exampleLegendOn
Gets or sets the pages on which the legend appears. Can be one of the values of the Legend enumeration.
Public propertyCode exampleRightImage
Gets or sets the right aligned image to be displayed in the page legend.
Public propertyCode exampleRightText
Gets or sets the right aligned text to display in the page legend.
Public propertyCode exampleWidth
Gets or sets the width of the legend.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
Shows how to work with page legend information.
var project = new Project(DataDir + "Blank2010.mpp");

// lets read page legend information
var legend = project.DefaultView.PageInfo.Legend;

Console.WriteLine("Legend left text: {0} ", legend.LeftText);
Console.WriteLine("Legend left image: {0} ", legend.LeftImage);
Console.WriteLine("Legend center text: {0} ", legend.CenteredText);
Console.WriteLine("Legend center image: {0} ", legend.CenteredImage);
Console.WriteLine("Legend right text: {0} ", legend.RightText);
Console.WriteLine("Legend right image: {0} ", legend.RightImage);
Console.WriteLine("Legend On: {0} ", legend.LegendOn);
Console.WriteLine("Legend Width: {0} ", legend.Width);

// also modification of a legend is supported
legend.LeftText = "New Left Text";

project.Save(OutDir + "WorkWithPageLegend_out.mpp", SaveFileFormat.MPP);
See Also