Version

IsContainerCompatibleWithItem Method

Determines if a container can be reused for a specific item.
Syntax
'Declaration
 
Protected Friend Overrides NotOverridable Function IsContainerCompatibleWithItem( _
   ByVal container As DependencyObject, _
   ByVal item As Object _
) As Boolean
protected internal override bool IsContainerCompatibleWithItem( 
   DependencyObject container,
   object item
)

Parameters

container
The container to be reused.
item
The potential new item.

Return Value

True if the container can be reused for the item
Remarks

When looking for a suitable container for an item the generator will search its cache and call this method to see if one of its cached containers is compatible with the item. If this method returns true then the container is assigned to the item and the ReuseContainerForNewItem method is called.

Note: the default implementation always returns true.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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