I am by no means a VB.NET programmer, so I sent this thread to our internal discussion group, and I get the answer from there:
MSFT Employee wrote:
Protected Shadows ReadOnly Property VisualChildrenCount() As IntegerGet
Return visuals.Count
End Get
End Property
Should be
Protected Overrides ReadOnly Property VisualChildrenCount() As Integer
Get
Return visuals.Count
End Get
End Property
When called on a parent class the Shadows property implementation is not called. Rather the base class property is called, which returns 1.
I should be able to figure this out myself, because In C#, I know what "Shadows" actually means:(