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

備註

下列解說文字會使用源文字的最小文字寬度,以多行顯示。 文字寬度下限會對應至具有最大寬度的字組,在此案例中為「跳躍」一詞。 請注意,只要其總寬度不超過文字寬度下限,多個單字可以出現在同一行。

使用最小段落寬度文字格式器 文字寬度下限

如果傳遞至 MaxTextWidth 的值大於或等於 的值 MinWidth ,則文字的格式沒有省略號字元。

適用於