Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I want to programatically fill InlineContentControls. When such a control is put inside a table cell then it is not discovered by the DocIO WordDocument. I attached a sample word document with 2 fields inside a table for you to test.
Code which I am using to get
var cc = new List
(); document.ChildEntities.Collect
(cc); public static class EntityCollectionExtensions
{
public static void Collect(this EntityCollection childEntities, List cc) where T : class
{
foreach (Entity e in childEntities)
{
if (e is T e1)
{
cc.Add(e1);
}
else
{
var childEntitiesProperty = e.GetType().GetProperty("ChildEntities");
if (childEntitiesProperty != null)
{
var ce = childEntitiesProperty.GetValue(e) as EntityCollection;
ce.Collect(cc);
}
}
}
}
}