Enum TimescaleFitBehavior

TimescaleFitBehavior enumeration

Represents a behavior used to align timescale area with page width.

public enum TimescaleFitBehavior

Values

NameValueDescription
DefinedInView0Calendar section is rendered according to View.PageInfo.PageViewSettings.FitTimescaleToEndOfPage property of the rendered View.
NoScaleToEndDate1Calendar section is rendered exactly to EndDate, even there is an empty space on a page.
NoScaleToEndOfPage2Calendar section is rendered to the end (right side) of the last page. Thus last rendered date may exceed EndDate.
ScaleToEndOfPage3Rendering engine will try to align dates so that EndDate is aligned with the end (right side) of the last page. Corresponds to MS Project’s “Page Setup \ View \ Fit timescale to end of page” option enabled.

Examples

Shows how to use TimescaleFitBehavior make Gantt chart’s timescale fit to the end of the last page.

var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");

var view = project.DefaultView as GanttChartView;

PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.PageSize = PageSize.A4;
saveOptions.StartDate = project.StartDate;
saveOptions.EndDate = project.FinishDate;
saveOptions.ViewSettings = view;
saveOptions.TimescaleFitBehavior = TimescaleFitBehavior.ScaleToEndOfPage;

project.Save(OutDir + "WorkWithPageSizeDefinedInView_out.pdf", saveOptions);

See Also