Class HeaderFooterInfo

HeaderFooterInfo class

Represents header or footer data which is present in views and used for printing.

public class HeaderFooterInfo

Constructors

NameDescription
HeaderFooterInfo()Initializes a new instance of the HeaderFooterInfo class.

Properties

NameDescription
CenteredImage { get; set; }Gets or sets the centered image to be displayed in the header or footer.
CenteredImageSize { get; set; }Gets or sets the displayed size of the center image.
CenteredText { get; set; }Gets or sets the centered text to display in the header or footer .
LeftImage { get; set; }Gets or sets the left aligned image to be displayed in the header or footer.
LeftImageSize { get; set; }Gets or sets the displayed size of the left image.
LeftText { get; set; }Gets or sets the left aligned text to display in the header or footer.
RightImage { get; set; }Gets or sets the right aligned image to be displayed in the header or footer.
RightImageSize { get; set; }Gets or sets the displayed size of the right image.
RightText { get; set; }Gets or sets the right aligned text to display in the header or footer.

Examples

Shows how to read page header/footer info.

var project = new Project(DataDir + "Blank2010.mpp");
var info = project.DefaultView.PageInfo;

Console.WriteLine("Header left text: {0} ", info.Header.LeftText);
Console.WriteLine("Header left image: {0} ", info.Header.LeftImage);
Console.WriteLine("Header left image size: {0} ", info.Header.LeftImageSize);
Console.WriteLine("Header center text: {0} ", info.Header.CenteredText);
Console.WriteLine("Header center image: {0} ", info.Header.CenteredImage);
Console.WriteLine("Header center image size: {0} ", info.Header.CenteredImageSize);
Console.WriteLine("Header right text: {0} ", info.Header.RightText);
Console.WriteLine("Header right image: {0} ", info.Header.RightImage);
Console.WriteLine("Header right image size: {0} ", info.Header.RightImageSize);
Console.WriteLine();
Console.WriteLine("Footer left text: {0} ", info.Footer.LeftText);
Console.WriteLine("Footer left image: {0} ", info.Footer.LeftImage);
Console.WriteLine("Footer left image size: {0} ", info.Footer.LeftImageSize);
Console.WriteLine("Footer center text: {0} ", info.Footer.CenteredText);
Console.WriteLine("Footer center image: {0} ", info.Footer.CenteredImage);
Console.WriteLine("Footer center size: {0} ", info.Footer.CenteredImageSize);
Console.WriteLine("Footer right text: {0} ", info.Footer.RightText);
Console.WriteLine("Footer right image: {0} ", info.Footer.RightImage);
Console.WriteLine("Footer right image size: {0} ", info.Footer.RightImageSize);

See Also