Version

Create(String,Boolean) Method

Creates an instance of an ITBarButton with the given Key property if such a button does not already exist.
Syntax
'Declaration
 
Overloads Function Create( _
   ByVal btnKey As String, _
   ByVal useCache As Boolean _
) As ITBarButton
ITBarButton Create( 
   string btnKey,
   bool useCache
)

Parameters

btnKey
The string that will be given to the Key property of the ITBarButton-implementing object.
useCache
A flag indicating whether the method should return an existing ITBarButton-implementing object if one already exists in a cache, instead of creating a new instance.

Return Value

An object implementing ITBarButton, generally an instance of TBarButton or one of its subclasses.
Remarks

An ITBarButton wrapper is created using this factory method when its not ordinarily desirable to create a new instance, but instead to reuse an existing button instance that may have already been cached. If no matching button instance can be found, this method instantiates a new instance of ITBarButton.

A conforming IButtonFactory implementation may ignore the useCache argument when HasCache is false. In this case, this factory method behaves as if no matching button could be found in the cache (it must create a new instance).

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