Version

GetBorderWidths Method (TabItemUIElement)

Returns the widths of all four borders
Syntax
'Declaration
 
Public Overrides Function GetBorderWidths( _
   ByVal style As UIElementBorderStyle, _
   ByVal sides As Border3DSide _
) As UIElementBorderWidths
public override UIElementBorderWidths GetBorderWidths( 
   UIElementBorderStyle style,
   Border3DSide sides
)

Parameters

style
The Infragistics.Win.UIElementBorderStyle of the borders.
sides
The System.Windows.Forms.Border3DSide of the borders.

Return Value

A Infragistics.Win.UIElementBorderWidths instance describing the widths of all four borders.
Example
This sample returns the pixel height of the top and bottom borders on the element passed in.

Imports Infragistics.Win
		
  Private Function CombinedBorderHeight(ByVal element As UIElement) As Integer
   
  ' Returns the pixel height of the top and bottom borders on the element passed in.
      Dim borderwidths As UIElementBorderWidths = element.GetBorderWidths(element.BorderStyle, element.BorderSides)

      Return borderwidths.Top + borderwidths.Bottom

  End Function
using Infragistics.Win;

private int CombinedBorderHeight(UIElement element)
{
 
	// Returns the pixel height of the top and bottom borders on the element passed in.
	UIElementBorderWidths borderwidths = element.GetBorderWidths( element.BorderStyle,element.BorderSides );

	return borderwidths.Top + borderwidths.Bottom;

}
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