Visual.VisualChildrenCount 속성
정의
protected:
virtual property int VisualChildrenCount { int get(); };
protected virtual int VisualChildrenCount { get; }
member this.VisualChildrenCount : int
Protected Overridable ReadOnly Property VisualChildrenCount As Integer
속성 값
자식 요소 수입니다.The number of child elements.
예제
다음 예제에서는의 재정의 된 구현을 정의 합니다 VisualChildrenCount .The following example defines an overridden implementation of 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 자식이 없습니다.By default, a Visual has no children. 따라서 기본 구현에서는 항상 0을 반환합니다.Therefore, the default implementation always returns 0.
상속자 참고
에서 파생 되는 클래스는 Visual 이 속성과 메서드를 재정의 하 여 GetVisualChild(Int32) 시각적 트리가 올바르게 열거 되도록 해야 합니다.A class that derives from Visual must override this property, and also the GetVisualChild(Int32) method, for the visual tree to be enumerated correctly.