Hello,
as you recommended I use PortionFormatEx class that contains all formatting properties. Could you please advise me how to change the following properties that are read-only:
- FillFormat
- HighlightColor
- UnderlineFillFormat
Thanks,
marxin
Hello,
Hi Marxin,
PresentationEx pres = new PresentationEx();SlideEx slide = pres.Slides[0];int ind = slide.Shapes.AddAutoShape (ShapeTypeEx.Rectangle ,0, 0, 500, 300);AutoShapeEx aShp = (AutoShapeEx)slide.Shapes[ind];aShp.AddTextFrame(string.Empty);TextFrameEx TxtFrm = aShp.TextFrame;PortionEx por = TxtFrm.Paragraphs[0].Portions[0];// por.HighlightColor.Color = Color.Blue;por.FillFormat.FillType = FillTypeEx.Solid;por.FillFormat.SolidFillColor.Color = Color.Brown;por.IsHardUnderlineFill = NullableBool.True;por.IsHardUnderlineLine = NullableBool.True;por.UnderlineFillFormat.FillType = FillTypeEx.Solid;por.UnderlineFillFormat.SolidFillColor.Color = Color.DarkCyan;por.Text = “Welcome to Aspose.Slides”;pres.Write(“D:\Aspose Data\PortionText.pptx”);