ContainerProperties not loading correctly

In Aspose.Diagram 26.1, a ContainerProperties property was added to shapes and are populated if the shape is a Visio container. Also, Page.DropContainer() was added to add a container to a page.

Unfortunately, ContainerProperties doesn’t seem to be populated from a shape when a document is opened.
I have a visio document with several differently styled containers that looks like this:
2026-01-09_15-16-32.png (10.9 KB)

A script which displays the container properties shows that all of the containers are identical according to the API:

$doc = New-Object Aspose.Diagram.Diagram -ArgumentList C:\temp\VisioPrimitives1.vsdx
$page=$doc.pages[0]

foreach($shape in $page.Shapes){
   if($Shape.ContainerProperties){
     $shape.ContainerProperties | select-object * -ExcludeProperty Shape,Document
   }
}

Here’s the output of the script:
2026-01-09_15-18-25.png (2.7 KB)

Here are the script and input file:
ContainerProperties.7z (382 Bytes)

@MikeShepard1

The issue you’re encountering—where ContainerProperties is not being populated correctly when loading an existing Visio document with containers—appears to be a bug in Aspose.Diagram 26.1.

You reported that although the ContainerProperties property was introduced in version 26.1 and should reflect the actual container styles and settings from the VSDX file, all loaded containers show identical (and seemingly default) property values, regardless of their visual differences in the original document . This suggests that while the API recognizes the shapes as containers (since ContainerProperties is not null), it fails to properly deserialize or load the specific container metadata from the file.

There is no documentation in the provided context confirming the expected behavior of ContainerProperties when loading existing containers from a VSDX file [2, 3, 4, 5]. However, based on your description and the fact that Page.DropContainer() was added to support container creation, it is reasonable to expect that ContainerProperties should also be fully populated when reading existing containers.

Given that your test shows loss of distinguishing properties between differently styled containers, this likely indicates an incomplete implementation or a parsing limitation in the current version.

Next steps:

  • This will be reported internally as a potential bug in the container properties deserialization logic.
  • As a workaround, you might try creating containers programmatically using Page.DropContainer() and inspecting their ContainerProperties to verify expected behavior.
  • Please ensure your file does not use custom or third-party container types that might not be fully supported.

We’ll investigate further and follow up in this thread.

@MikeShepard1
Thanks for the script and screenshots.
Could you please also provide the input file “VisioPrimitives1.vsdx”,We will evaluate your issue further.
Thanks.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53883

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

My bad…I thought I had included it in the archive file. Here’s a new file with both the script and the visio.
VisioPrimitives1.zip (65.3 KB)

Also, after a container has been added to a page with Page.DropContainer, the Shape property of the dropped container’s ContainerProperties still references the original shape.

image.png (2.2 KB)

@MikeShepard1
Thanks for the template file and screenshots.
We need to evaluate your issue/requirements in detail.
Thanks.