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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

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 

InlineContentControls from a 
WordDocument object is:


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);

                    }

                }

            }

        }

    }