FormattedText.MinWidth プロパティ

定義

指定したテキスト コンテンツをすべて格納できる最小のテキスト幅を取得します。

public:
 property double MinWidth { double get(); };
public double MinWidth { get; }
member this.MinWidth : double
Public ReadOnly Property MinWidth As Double

プロパティ値

デバイスに依存しない単位 (単位あたり 1/96 インチ) で提供されるテキスト ソースの最小テキスト幅。

次の例では、 プロパティを使用 MinWidth して、書式設定されたテキスト行の最小テキスト幅を生成する方法を示します。

// Get the minimimum line width for the text content -- that is, the widest word.
double minWidth = formattedText.MinWidth;

// Set the maximum text width to the widest word in the text content.
formattedText.MaxTextWidth = minWidth;
' Get the minimimum line width for the text content -- that is, the widest word.
Dim minWidth As Double = formattedText.MinWidth

' Set the maximum text width to the widest word in the text content.
formattedText.MaxTextWidth = minWidth

注釈

次の図のテキストでは、ソース テキストの最小テキスト幅が使用され、複数行として表示されます。 テキストの最小幅は、最も幅が大きい単語 (この場合は "jumped" という単語) に対応します。 複数の単語が同じ行に表示される場合は、その合計幅がテキストの最小幅を超えていないことに注意してください。

段落の最小幅を使用するテキスト フォーマ テキストの最小幅

MaxTextWidth 渡される値が の値以上の MinWidth場合、テキストは省略記号なしで書式設定されます。

適用対象