Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ public bool SkipSummaryAssignments { get; set; }

Primavera software doesn't support assignments of resources to summary (WBS) tasks. Thus, export of such assignments can result in an invalid file according to Primavera's model. If true, assignments to summary tasks are skipped during export. If false (the default value), an exception will be thrown if assignment to a summary task is encountered during export.

## Examples

Shows how to use SkipSummaryAssignments flag.

```csharp
var project = new Project(DataDir + "Blank2010.mpp");

var resource = project.Resources.Add("Resource");

var summaryTask = project.RootTask.Children.Add("Summary");
summaryTask.Children.Add("Task");

// Primavera doesn't support assignments of resources to summary tasks.
// So exporting such assignments to Primavera format may result in files that cannot be imported to Primavera.
var assignment = project.ResourceAssignments.Add(summaryTask, resource);

var options = new PrimaveraXmlSaveOptions();
options.SkipSummaryAssignments = true;
project.Save(OutDir + "UseSkipSummaryAssignments_out.xml", options);
```

### See Also

* class [PrimaveraSaveOptions](../)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ public bool SkipSummaryAssignments { get; set; }

Primavera software doesn't support assignments of resources to summary (WBS) tasks. Thus, export of such assignments can result in an invalid file according to Primavera's model. If true, assignments to summary tasks are skipped during export. If false (the default value), an exception will be thrown if assignment to a summary task is encountered during export.

## Examples

Shows how to use SkipSummaryAssignments flag.

```csharp
var project = new Project(DataDir + "Blank2010.mpp");

var resource = project.Resources.Add("Resource");

var summaryTask = project.RootTask.Children.Add("Summary");
summaryTask.Children.Add("Task");

// Primavera doesn't support assignments of resources to summary tasks.
// So exporting such assignments to Primavera format may result in files that cannot be imported to Primavera.
var assignment = project.ResourceAssignments.Add(summaryTask, resource);

var options = new PrimaveraXmlSaveOptions();
options.SkipSummaryAssignments = true;
project.Save(OutDir + "UseSkipSummaryAssignments_out.xml", options);
```

### See Also

* class [PrimaveraXmlSaveOptions](../)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ SaveOptions options = new PdfSaveOptions
project.Save(OutDir + "Legend_DefinedInView.pdf", options);
```

Shows how to customize task bars in page legend of Gantt chart.

```csharp
var project = new Project(DataDir + "Blank2010.mpp");

var pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.StartDate = project.StartDate;
pdfSaveOptions.EndDate = project.FinishDate;
pdfSaveOptions.PageSize = PageSize.A4;
pdfSaveOptions.LegendDrawingOptions = LegendDrawingOptions.OnEveryPage;
pdfSaveOptions.ViewSettings = project.Views.GetByName("&Gantt Chart");

pdfSaveOptions.LegendItems = new PageLegendItem[]
{
new PageLegendItem(BarItemType.Task, "Task"),
new PageLegendItem(BarItemType.ExternalMilestone, "External Milestone"),
new PageLegendItem(BarItemType.SummaryRollup, "Summary Rollup"),
new PageLegendItem(BarItemType.InactiveTask, "Inactive Task"),
new PageLegendItem(BarItemType.ManualSummary, "Manual Summary")
};

project.Save(OutDir + "CustomizePageLegendItems_out.pdf", pdfSaveOptions);
```

### See Also

* enum [LegendDrawingOptions](../../legenddrawingoptions/)
Expand Down
26 changes: 26 additions & 0 deletions english/net/aspose.tasks.saving/saveoptions/legenditems/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,32 @@ public PageLegendItem[] LegendItems { get; set; }

Is only applicable when Gantt chart view is rendered.

## Examples

Shows how to customize task bars in page legend of Gantt chart.

```csharp
var project = new Project(DataDir + "Blank2010.mpp");

var pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.StartDate = project.StartDate;
pdfSaveOptions.EndDate = project.FinishDate;
pdfSaveOptions.PageSize = PageSize.A4;
pdfSaveOptions.LegendDrawingOptions = LegendDrawingOptions.OnEveryPage;
pdfSaveOptions.ViewSettings = project.Views.GetByName("&Gantt Chart");

pdfSaveOptions.LegendItems = new PageLegendItem[]
{
new PageLegendItem(BarItemType.Task, "Task"),
new PageLegendItem(BarItemType.ExternalMilestone, "External Milestone"),
new PageLegendItem(BarItemType.SummaryRollup, "Summary Rollup"),
new PageLegendItem(BarItemType.InactiveTask, "Inactive Task"),
new PageLegendItem(BarItemType.ManualSummary, "Manual Summary")
};

project.Save(OutDir + "CustomizePageLegendItems_out.pdf", pdfSaveOptions);
```

### See Also

* class [PageLegendItem](../../../aspose.tasks.visualization/pagelegenditem/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ Gets or sets a behavior which define how to align right end of the timescale wit
public TimescaleFitBehavior TimescaleFitBehavior { get; set; }
```

## Examples

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

```csharp
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

* enum [TimescaleFitBehavior](../../../aspose.tasks.visualization/timescalefitbehavior/)
Expand Down
2 changes: 1 addition & 1 deletion english/net/aspose.tasks.visualization/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Contains helper classes for rendering.
| [GanttChartColumn](./ganttchartcolumn/) | Project's view class |
| [Gridline](./gridline/) | The horizontal or vertical line that appears in the project view. |
| [Gridlines](./gridlines/) | Represents gridlines that appear in a GanttChart view. |
| [HeaderFooterInfo](./headerfooterinfo/) | Represents header or footer data which is present in views and used for printing. |
| [HeaderFooterInfo](./headerfooterinfo/) | Represents visual content of the header, footer or legend which is used for printing \ rendering of views. |
| [PageInfo](./pageinfo/) | Represents page setup data which is present in MPP file format and used for printing. |
| [PageLegend](./pagelegend/) | Represents a page legend which is used for project printing. |
| [PageLegendItem](./pagelegenditem/) | Represents an item of page legend of Gantt chart. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Class HeaderFooterInfo
second_title: Aspose.Tasks for .NET API Reference
description: Aspose.Tasks.Visualization.HeaderFooterInfo class. Represents header or footer data which is present in views and used for printing
description: Aspose.Tasks.Visualization.HeaderFooterInfo class. Represents visual content of the header footer or legend which is used for printing rendering of views
type: docs
weight: 3040
url: /net/aspose.tasks.visualization/headerfooterinfo/
---
## HeaderFooterInfo class

Represents header or footer data which is present in views and used for printing.
Represents visual content of the header, footer or legend which is used for printing \ rendering of views.

```csharp
public class HeaderFooterInfo
Expand All @@ -24,15 +24,15 @@ public class HeaderFooterInfo

| Name | Description |
| --- | --- |
| [CenteredImage](../../aspose.tasks.visualization/headerfooterinfo/centeredimage/) { get; set; } | Gets or sets the centered image to be displayed in the header or footer. |
| [CenteredImage](../../aspose.tasks.visualization/headerfooterinfo/centeredimage/) { get; set; } | Gets or sets the centered image to be displayed in the parent element. |
| [CenteredImageSize](../../aspose.tasks.visualization/headerfooterinfo/centeredimagesize/) { get; set; } | Gets or sets the displayed size of the center image. |
| [CenteredText](../../aspose.tasks.visualization/headerfooterinfo/centeredtext/) { get; set; } | Gets or sets the centered text to display in the header or footer . |
| [LeftImage](../../aspose.tasks.visualization/headerfooterinfo/leftimage/) { get; set; } | Gets or sets the left aligned image to be displayed in the header or footer. |
| [CenteredText](../../aspose.tasks.visualization/headerfooterinfo/centeredtext/) { get; set; } | Gets or sets the centered text to display in the parent element. |
| [LeftImage](../../aspose.tasks.visualization/headerfooterinfo/leftimage/) { get; set; } | Gets or sets the left aligned image to be displayed in the parent element. |
| [LeftImageSize](../../aspose.tasks.visualization/headerfooterinfo/leftimagesize/) { get; set; } | Gets or sets the displayed size of the left image. |
| [LeftText](../../aspose.tasks.visualization/headerfooterinfo/lefttext/) { get; set; } | Gets or sets the left aligned text to display in the header or footer. |
| [RightImage](../../aspose.tasks.visualization/headerfooterinfo/rightimage/) { get; set; } | Gets or sets the right aligned image to be displayed in the header or footer. |
| [LeftText](../../aspose.tasks.visualization/headerfooterinfo/lefttext/) { get; set; } | Gets or sets the left aligned text to display in the parent element. |
| [RightImage](../../aspose.tasks.visualization/headerfooterinfo/rightimage/) { get; set; } | Gets or sets the right aligned image to be displayed in the parent element. |
| [RightImageSize](../../aspose.tasks.visualization/headerfooterinfo/rightimagesize/) { get; set; } | Gets or sets the displayed size of the right image. |
| [RightText](../../aspose.tasks.visualization/headerfooterinfo/righttext/) { get; set; } | Gets or sets the right aligned text to display in the header or footer. |
| [RightText](../../aspose.tasks.visualization/headerfooterinfo/righttext/) { get; set; } | Gets or sets the right aligned text to display in the parent element. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: HeaderFooterInfo.CenteredImage
second_title: Aspose.Tasks for .NET API Reference
description: HeaderFooterInfo property. Gets or sets the centered image to be displayed in the header or footer
description: HeaderFooterInfo property. Gets or sets the centered image to be displayed in the parent element
type: docs
weight: 20
url: /net/aspose.tasks.visualization/headerfooterinfo/centeredimage/
---
## HeaderFooterInfo.CenteredImage property

Gets or sets the centered image to be displayed in the header or footer.
Gets or sets the centered image to be displayed in the parent element.

```csharp
public Image CenteredImage { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: HeaderFooterInfo.CenteredText
second_title: Aspose.Tasks for .NET API Reference
description: HeaderFooterInfo property. Gets or sets the centered text to display in the header or footer
description: HeaderFooterInfo property. Gets or sets the centered text to display in the parent element
type: docs
weight: 40
url: /net/aspose.tasks.visualization/headerfooterinfo/centeredtext/
---
## HeaderFooterInfo.CenteredText property

Gets or sets the centered text to display in the header or footer .
Gets or sets the centered text to display in the parent element.

```csharp
public string CenteredText { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: HeaderFooterInfo.LeftImage
second_title: Aspose.Tasks for .NET API Reference
description: HeaderFooterInfo property. Gets or sets the left aligned image to be displayed in the header or footer
description: HeaderFooterInfo property. Gets or sets the left aligned image to be displayed in the parent element
type: docs
weight: 50
url: /net/aspose.tasks.visualization/headerfooterinfo/leftimage/
---
## HeaderFooterInfo.LeftImage property

Gets or sets the left aligned image to be displayed in the header or footer.
Gets or sets the left aligned image to be displayed in the parent element.

```csharp
public Image LeftImage { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: HeaderFooterInfo.LeftText
second_title: Aspose.Tasks for .NET API Reference
description: HeaderFooterInfo property. Gets or sets the left aligned text to display in the header or footer
description: HeaderFooterInfo property. Gets or sets the left aligned text to display in the parent element
type: docs
weight: 70
url: /net/aspose.tasks.visualization/headerfooterinfo/lefttext/
---
## HeaderFooterInfo.LeftText property

Gets or sets the left aligned text to display in the header or footer.
Gets or sets the left aligned text to display in the parent element.

```csharp
public string LeftText { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: HeaderFooterInfo.RightImage
second_title: Aspose.Tasks for .NET API Reference
description: HeaderFooterInfo property. Gets or sets the right aligned image to be displayed in the header or footer
description: HeaderFooterInfo property. Gets or sets the right aligned image to be displayed in the parent element
type: docs
weight: 80
url: /net/aspose.tasks.visualization/headerfooterinfo/rightimage/
---
## HeaderFooterInfo.RightImage property

Gets or sets the right aligned image to be displayed in the header or footer.
Gets or sets the right aligned image to be displayed in the parent element.

```csharp
public Image RightImage { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: HeaderFooterInfo.RightText
second_title: Aspose.Tasks for .NET API Reference
description: HeaderFooterInfo property. Gets or sets the right aligned text to display in the header or footer
description: HeaderFooterInfo property. Gets or sets the right aligned text to display in the parent element
type: docs
weight: 100
url: /net/aspose.tasks.visualization/headerfooterinfo/righttext/
---
## HeaderFooterInfo.RightText property

Gets or sets the right aligned text to display in the header or footer.
Gets or sets the right aligned text to display in the parent element.

```csharp
public string RightText { get; set; }
Expand Down
25 changes: 0 additions & 25 deletions english/net/aspose.tasks.visualization/legend/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,6 @@ public enum Legend
| AfterLastPage | `1` | The legend is rendered on a separate page after the last page of the project's pages. |
| OnEveryPage | `2` | The legend is rendered on every page. |

## Examples

Shows how to work with page legend information.

```csharp
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

* namespace [Aspose.Tasks.Visualization](../../aspose.tasks.visualization/)
Expand Down
23 changes: 23 additions & 0 deletions english/net/aspose.tasks.visualization/pageinfo/legend/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ Currently is applicable only to Gantt Chart views.

## Examples

Shows how to work with page legend information.

```csharp
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);
```

Shows how to work with page info of MS Project view.

```csharp
Expand Down
20 changes: 12 additions & 8 deletions english/net/aspose.tasks.visualization/pagelegend/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ url: /net/aspose.tasks.visualization/pagelegend/
Represents a page legend which is used for project printing.

```csharp
public class PageLegend
public class PageLegend : HeaderFooterInfo
```

## Constructors
Expand All @@ -24,14 +24,17 @@ public class PageLegend

| Name | Description |
| --- | --- |
| [CenteredImage](../../aspose.tasks.visualization/pagelegend/centeredimage/) { get; set; } | Gets or sets the centered image to be displayed in the page legend. |
| [CenteredText](../../aspose.tasks.visualization/pagelegend/centeredtext/) { get; set; } | Gets or sets the centered text to display in the page legend. |
| [LeftImage](../../aspose.tasks.visualization/pagelegend/leftimage/) { get; set; } | Gets or sets the left aligned image to be displayed in the page legend. |
| [LeftText](../../aspose.tasks.visualization/pagelegend/lefttext/) { get; set; } | Gets or sets the left aligned text to display in the page legend. |
| [CenteredImage](../../aspose.tasks.visualization/headerfooterinfo/centeredimage/) { get; set; } | Gets or sets the centered image to be displayed in the parent element. |
| [CenteredImageSize](../../aspose.tasks.visualization/headerfooterinfo/centeredimagesize/) { get; set; } | Gets or sets the displayed size of the center image. |
| [CenteredText](../../aspose.tasks.visualization/headerfooterinfo/centeredtext/) { get; set; } | Gets or sets the centered text to display in the parent element. |
| [LeftImage](../../aspose.tasks.visualization/headerfooterinfo/leftimage/) { get; set; } | Gets or sets the left aligned image to be displayed in the parent element. |
| [LeftImageSize](../../aspose.tasks.visualization/headerfooterinfo/leftimagesize/) { get; set; } | Gets or sets the displayed size of the left image. |
| [LeftText](../../aspose.tasks.visualization/headerfooterinfo/lefttext/) { get; set; } | Gets or sets the left aligned text to display in the parent element. |
| [LegendOn](../../aspose.tasks.visualization/pagelegend/legendon/) { get; set; } | Gets or sets the pages on which the legend appears. Can be one of the values of the [`Legend`](../legend/) enumeration. |
| [RightImage](../../aspose.tasks.visualization/pagelegend/rightimage/) { get; set; } | Gets or sets the right aligned image to be displayed in the page legend. |
| [RightText](../../aspose.tasks.visualization/pagelegend/righttext/) { get; set; } | Gets or sets the right aligned text to display in the page legend. |
| [Width](../../aspose.tasks.visualization/pagelegend/width/) { get; set; } | Gets or sets the width of the legend. |
| [RightImage](../../aspose.tasks.visualization/headerfooterinfo/rightimage/) { get; set; } | Gets or sets the right aligned image to be displayed in the parent element. |
| [RightImageSize](../../aspose.tasks.visualization/headerfooterinfo/rightimagesize/) { get; set; } | Gets or sets the displayed size of the right image. |
| [RightText](../../aspose.tasks.visualization/headerfooterinfo/righttext/) { get; set; } | Gets or sets the right aligned text to display in the parent element. |
| [Width](../../aspose.tasks.visualization/pagelegend/width/) { get; set; } | Gets or sets the width of the left part (containing project's name and date by default) of the legend in centimeters. |

## Examples

Expand Down Expand Up @@ -60,6 +63,7 @@ project.Save(OutDir + "WorkWithPageLegend_out.mpp", SaveFileFormat.Mpp);

### See Also

* class [HeaderFooterInfo](../headerfooterinfo/)
* namespace [Aspose.Tasks.Visualization](../../aspose.tasks.visualization/)
* assembly [Aspose.Tasks](../../)

Expand Down
Loading