Here is a hierarchy of my class MyContainer.  Notice that the Panel has a Children as well as MyContainer. Can I still use the Children from Panel as well? 
What is the meaning of [ContentProperty("Children", true)]? The summary explains:
Specifies which property of a class can be interpreted to be the content property when the class is parsed by a XAML processor.
But I am not understanding what he means?
[ContentProperty("Children", true)]
public abstract class Panel : FrameworkElement
{
    //
    // Summary:
    //     Gets the collection of child elements of the panel.
    //
    // Returns:
    //     The collection of child objects. The default is an e开发者_C百科mpty collection.
    public UIElementCollection Children { get; }
}
public class Canvas : Panel
{....}
public class MyContainer : Canvas
{
    public MyContainer();
    public ObservableCollection<MyObject> Children {get;}
}
The ContentProperty attribute means that the following two elements are equivalent - the Children property of Canvas is the default content of the Canvas.
<Canvas>
    <TextBlock Text="Hello"/>
    <Button Content="World"/>
</Canvas>
<Canvas>
    <Canvas.Children>
        <TextBlock Text="Hello"/>
        <Button Content="World"/>
    </Canvas.Children>
</Canvas>
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论