Version

CalculateImageAndTextSize(Size,Size,Size,Size,Size,UIElementBorderStyle,Border3DSide,TextPlacement) Method

Calculates the size required to completely display an ImageAndFormattedTextUIElement.
Syntax
'Declaration
 
Public Overloads Shared Function CalculateImageAndTextSize( _
   ByVal imgSize As Size, _
   ByVal textSize As Size, _
   ByVal imagePadding As Size, _
   ByVal textPadding As Size, _
   ByVal padding As Size, _
   ByVal borderStyle As UIElementBorderStyle, _
   ByVal borderSides As Border3DSide, _
   ByVal textPlacement As TextPlacement _
) As Size
public static Size CalculateImageAndTextSize( 
   Size imgSize,
   Size textSize,
   Size imagePadding,
   Size textPadding,
   Size padding,
   UIElementBorderStyle borderStyle,
   Border3DSide borderSides,
   TextPlacement textPlacement
)

Parameters

imgSize
Size of the image. If there is no image, Size.Empty may be used.
textSize
Size of the text. If there is no text, Size.Empty may be used.
imagePadding
Amount of padding around the image - only added in if the image size is at least 1,1
textPadding
Amount of padding around the text - only added in if the text size is at least 1,1
padding
Amount of padding around the text and image. This is always added in.
borderStyle
Border style
borderSides
Which borders are used.
textPlacement
Indicates how the text is placed in relation to the image.

Return Value

Size of the image and text element.
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