Setting Text Styles of Tasks with Aspose.Tasks for .NET 17.7

Share on FacebookTweet about this on TwitterShare on LinkedIn

We are pleased to announce the release of Aspose.Tasks for .NET 17.7. It includes an enhancement for adding text styles to a project’s tasks representation. We have also fixed several bugs in this month’s release which further add to the overall stability of the API. For a complete list of what is new and fixed, please visit the release notes section of the API in product documentation.

Enhancements

Support for Adding Text Styles: You can now modify Gantt chart view’s text style using the TableTextStyles collection of the API. This allows to format fields such as Color, Font style, etc. of the specified task fields in tasks list. The following code sample shows formatting of a task’s text style using this enhancement.

Project project = new Project(d"Project5.mpp");
var ganttChartView = project.Views.ToList()[0] as GanttChartView;
if (ganttChartView != null)
{
    ganttChartView.TableTextStyles.Clear();
    ganttChartView.TableTextStyles.Add(new TableTextStyle(1) { Color = Color.Red, Field = Field.TaskName });
    ganttChartView.TableTextStyles.Add(new TableTextStyle(1) { Color = Color.Gray, Field = Field.TaskDurationText });
    ganttChartView.TableTextStyles.Add(new TableTextStyle(2) { Color = Color.Blue, FontStyle = FontStyle.Bold | FontStyle.Italic | FontStyle.Underline });
}

Other Improvements

Several bugs have been fixed in this month’s release. These are relevant to different API functionality and improve the overall API behavior in terms of expected results. Some of these include:

  • Project loading exceptions while reading certain MPP files
  • Errors raised by the API with the latest version of Microsoft Project upgrade 1706
  • Issue with lookup values not being created in MPP file
  • Calculation errors of project data after update
  • Issue with Task Links, visual display of Gantt Chart bars and Text Styling

API Resources

You may visit the following API resources for getting started and working with the API.

  • Product Documentation – Detailed API documentation with code examples and details about API functional areas
  • Aspose.Tasks Forum – Our online support forum where we address your queries and inquiries