Unfortunately, I’ve reproduced the same issue with the same results. I’ve added a ticket with ID SLIDESNET-43530 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate the case. We will let you know when we resolve this issue.
The issues you found earlier (filed as SLIDESNET-43530) have been fixed in Aspose.Slides for .NET 23.2 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.
@bingxie,
With Aspose.Slides 23.2, please try using the following test code example:
string presPath = "newpresentation.pptx";
// create a new presentation from scratch
using (Presentation pres = new Presentation())
{
ISlide slide = pres.Slides[0];
IAutoShape shape1 = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 10, 50, 20);
// Assert.False(shape1.IsTextBox); // here IsTextBox must be false
shape1.TextFrame.Text = "Shape with text"; // just set Text value
// Assert.True(shape1.IsTextBox); // here IsTextBox must be true
pres.Save(presPath, SaveFormat.Pptx);
}
// reopen the presentation
using (Presentation pres = new Presentation(presPath))
{
ISlide slide = pres.Slides[0];
IAutoShape shape1 = (IAutoShape)slide.Shapes[0];
// Assert.True(shape1.IsTextBox); // here IsTextBox must be true
}