ContainerVisual 构造函数

定义

创建 ContainerVisual 类的新实例。

public:
 ContainerVisual();
public ContainerVisual ();
Public Sub New ()

示例

以下示例演示如何创建对象的新实例,然后将子视觉对象添加到该对象 ContainerVisual

// Create a ContainerVisual and add children to it.
ContainerVisual containerVisual = new ContainerVisual();
containerVisual.Children.Add(CreateDrawingVisualRectangle());
containerVisual.Children.Add(CreateDrawingVisualText());
containerVisual.Children.Add(CreateDrawingVisualEllipses());
' Create a ContainerVisual and add children to it.
Dim containerVisual As New ContainerVisual()
containerVisual.Children.Add(CreateDrawingVisualRectangle())
containerVisual.Children.Add(CreateDrawingVisualText())
containerVisual.Children.Add(CreateDrawingVisualEllipses())

适用于