Live Chat Icon For mobile
Live Chat Icon

How can I get an enumerator to the ContentControl’s logical child elements ?

Platform: WPF| Category: Templates

The LogicalChildren of a ContentControl is of ‘protected-type’ access. You can derive a custom class from it and then expose a public version of the ‘LogicalChildren’ property.

 [C#]

    public class SPanel : StackPanel
    {
        public System.Collections.IEnumerator LogicalChildren {
            get {
                return base.LogicalChildren;
            }
        }
    }

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.