【发布时间】:2011-06-11 17:34:12
【问题描述】:
TextBlock 控件中是否可以设置边距文本?
我在 textBlock 控件上的风格在这里:
<Style x:Key="InfosStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Height" Value="35"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Justify"/>
<!--<Setter Property="BorderThickness" Value="1"/>-->
<!--<Setter Property="BorderBrush" Value="#BFE3FE"/>-->
<Setter Property="Background" Value="#BFE3FE"/>
<Setter Property="Margin" Value="2,4,0,1" />
</Style>
结果在这里:
例如,我想在 textBlock 中对齐或设置文本边距。
现在:|Chatuje 到 |_Chatuje
我想在 TextBlock 的左侧有一些空闲空间。
可用空间 TextOfTextBlock
没有
TextOfTextBlock
【问题讨论】:
标签: wpf margin textblock alignment