Version

GetBehaviorByInterface<TInterface> Method

Gets a behavior by its interface.
Syntax
'Declaration
 
Public Overridable Function GetBehaviorByInterface(Of TInterface As IBehaviorInterface)() As TInterface
public virtual TInterface GetBehaviorByInterface<TInterface>()
where TInterface: IBehaviorInterface

Type Parameters

TInterface
Interface that the requested behavior supports. Must be inherited from IBehaviorInterface.

Return Value

First match of the behavior with the interface in the collection.
Remarks
The method can be used to retrieve a behavior that implements a certain interface. Default behaviors in the grid assembly implement their corresponding interfaces. It is possible to create a substitute behavior that implements an interface that the default behavior use. That way the grid's behaviors can be extended without impacting the core logic of the control.
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