Visual.VisualChildrenCount 속성

정의

Visual의 자식 요소 수를 가져옵니다.

protected:
 virtual property int VisualChildrenCount { int get(); };
protected virtual int VisualChildrenCount { get; }
member this.VisualChildrenCount : int
Protected Overridable ReadOnly Property VisualChildrenCount As Integer

속성 값

Int32

자식 요소 수입니다.

예제

다음 예제에서는 재정의된 구현을 정의합니다 VisualChildrenCount.

// Provide a required override for the VisualChildrenCount property.
protected override int VisualChildrenCount
{
    get { return _children.Count; }
}
' Provide a required override for the VisualChildrenCount property.
Protected Overrides ReadOnly Property VisualChildrenCount() As Integer
    Get
        Return _children.Count
    End Get
End Property

설명

기본적으로 Visual 자식이 없습니다. 따라서 기본 구현에서는 항상 0을 반환합니다.

상속자 참고

파생 Visual 되는 클래스는 시각적 트리가 올바르게 열거되려면 이 속성과 GetVisualChild(Int32) 메서드를 재정의해야 합니다.

적용 대상