Version

ShouldRenderChild Method

Determines whether a particular child UIElement should have Render called upon it by the base class' implementation of Render.
Syntax
'Declaration
 
Protected Overridable Function ShouldRenderChild( _
   ByVal child As UIElement _
) As Boolean
protected virtual bool ShouldRenderChild( 
   UIElement child
)

Parameters

child
The child UIElement.

Return Value

This method always returns True when child is not null (Nothing in Visual Basic .NET); inheritors may override this implementation when providing custom logic to filter out certain child UIElements from being rendered by returning False when such conditions are met.
Remarks

Inheritors should call the base implementation, and logically-AND the result of that call with the boolean result of their own custom processing. This ensures that a NullReferenceException doesn't occur because the base class' check of whether this child UIElement was null (Nothing in Visual Basic .NET) was overridden.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also