Learn How To set the style of the text in a visio page with Aspose.Diagram
In this tutorial, we'll set the style of the text in a visio file.
We'll start by creating a new diagram using the Aspose.Diagram library and add text.
In this tutorial, we'll set the style of the text in a visio file.
We'll start by creating a new diagram using the Aspose.Diagram library and add text.
using System;
using System.Drawing;
using System.IO;
using Aspose.Diagram.Saving;
using Aspose.Diagram;
Aspose.Diagram.Diagram diagram = new Aspose.Diagram.Diagram();
diagram.Pages[0].PageSheet.PageProps.PageWidth.Value = 10;
diagram.Pages[0].PageSheet.PageProps.PageHeight.Value = 10;
var shapeId = diagram.Pages[0].DrawRectangle(5, 5, 7, 5);
Shape shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Line.LineWeight.Value = 0.1;
shape.Line.Rounding.Value = 0;
// Add text to shape
var txt = new Txt("Hello world!");
shape.Text.Value.Add(txt);
diagram
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising. Google's data policies
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.