バージョン

CalculateImageAndTextSize(Size,Size,Size,Size,Size,Boolean,UIElementBorderStyle,Border3DSide,ContentAlignment) メソッド

ImageAndTextUIElement を完全に表示するために必要となるサイズを計算します。
シンタックス
'宣言
 
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 vertical As Boolean, _
   ByVal borderStyle As UIElementBorderStyle, _
   ByVal borderSides As Border3DSide, _
   ByVal imageAlignment As ContentAlignment _
) As Size
public static Size CalculateImageAndTextSize( 
   Size imgSize,
   Size textSize,
   Size imagePadding,
   Size textPadding,
   Size padding,
   bool vertical,
   UIElementBorderStyle borderStyle,
   Border3DSide borderSides,
   ContentAlignment imageAlignment
)

パラメータ

imgSize
画像のサイズ。画像がない場合、Size.Empty を使用できます。
textSize
テキストのサイズ。テキストがない場合、Size.Empty を使用できます。
imagePadding
画像の周りのパディング量 - 画像サイズが少なくとも1,1の場合に限り追加されます
textPadding
テキストの周りのパディング量 - テキストサイズが少なくとも1,1の場合に限り追加されます
padding
テキストと画像の周りのパディング量。これは常に追加されます。
vertical
要素が垂直に表示されるかどうかを示します。
borderStyle
境界線スタイル
borderSides
使用されている境界線。
imageAlignment
画像の配置。CenterMiddleに設定すると、画像とテキストは重複します。

戻り値の型

画像およびテキスト要素のサイズ。
参照