TextBlock.Padding 屬性

定義

取得或設定值,這個值表示內容區域界限與 TextBlock 所顯示內容之間的邊框間距粗細。

public:
 property Thickness Padding { Thickness get(); void set(Thickness value); };
Thickness Padding();

void Padding(Thickness value);
public Thickness Padding { get; set; }
var thickness = textBlock.padding;
textBlock.padding = thickness;
Public Property Padding As Thickness
<TextBlock Padding="uniform"/>
- or -
<TextBlock Padding="left&Right,top&Bottom"/>
- or -
<TextBlock Padding="left,top,right,bottom"/>

屬性值

粗細結構,指定要套用的邊框間距量。

備註

相關屬性是 Margin (FrameworkElement) 的屬性。 如需邊界與邊框間距之間關聯性的詳細資訊,請參閱 對齊、邊界和邊框間距使用 XAML 定義版面配置。

適用於

另請參閱