Version

DrawTheme Method (TabListButtonUIElement)

Handles the rendering of the element using the system themes.
Syntax
'Declaration
 
Protected Overrides Function DrawTheme( _
   ByRef drawParams As UIElementDrawParams _
) As Boolean
protected override bool DrawTheme( 
   ref UIElementDrawParams drawParams
)

Parameters

drawParams
The Infragistics.Win.UIElementDrawParams used to provide rendering information.

Return Value

A boolean indicating if the element was able to successfully render with the system theme. Used to determine whether the remaining draw methods are invoked.
Example
To add XP theming support to your element. Simply override the virtual method DrawTheme. Use the XPThemes class to render the system based theme element.

Imports Infragistics.Win

Protected Overrides Function DrawTheme(ByRef drawParams As Infragistics.Win.UIElementDrawParams) As Boolean
     
       Return XPThemes.Button.DrawPushButton( _
        drawParams, _
        Me.Rect, _
        drawParams.InvalidRect, _
        UIElementButtonState.Inactive, False)

   End Function
using Infragistics.Win;

protected override bool DrawTheme( ref UIElementDrawParams drawParams )
{

	return XPThemes.Button.DrawPushButton(ref drawParams, 
										     this.Rect, 
										     drawParams.InvalidRect, 
										     UIElementButtonState.Inactive,false);

}
Requirements

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