Imran-
I tried to implement styling through the Char property as you mentioned. However, I cannot get any changes to the text to come through.
I have tried bolding, font size increase/decrease, underlining, etc. and nothing ends up on the PDF.
My code is below:
private void AddPogHeaderInformationToDiagram(Diagram diagram, double x, double y)
{
Shape headerInformationShape = new Shape();
// Add planogram header information to top of diagram
headerInformationShape.Text.Value.Add(new Cp(0));
headerInformationShape.Text.Value.Add(new Txt(string.Format("Planogram ID: {0} " + Environment.NewLine + “Planogram Name: {1}”, this.Planogram.PogId, this.Planogram.PogName)));
headerInformationShape.SetHeight(.5);
headerInformationShape.Fill.FillForegnd.Value = “#DEC2B8”;
headerInformationShape.SetWidth(5);
headerInformationShape.XForm.PinX.Value = x + 5;
headerInformationShape.XForm.PinY.Value = y;
headerInformationShape.Chars.Add(new Aspose.Diagram.Char());
headerInformationShape.Chars[0].Size.Value = 20;
headerInformationShape.Chars[0].Font.Value = 20;
diagram.AddShape(headerInformationShape, “Rectangle”, 0);
}
Unfortunately I am not really able to prepare a console application for you to test this locally. But this is still something I need to find a solution for. Without a console application, can you think of anything else that may be causing styles to not show on the text? I made sure there was no code after my function AddPogHeaderInformationToDiagram() that would be clearing styles from the text inside the shape.