2011-01-19 11 views
6

여백이 있습니까? TextBlock 컨트롤의 텍스트입니까?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> 

결과는 여기에 있습니다 : examole를 들어 내가 TextBlock의 텍스트에 정렬 또는 설정 마진을 싶습니다

alt text

.

현재 : | Chatuje에 | _Chatuje

내가 TextBlock의 왼쪽에 약간의 여유 공간이 싶습니다.

여유 공간 TextOfTextBlock

없음

TextOfTextBlock 당신은 당신의 스타일 Padding을 설정해야

답변

18

.하지 이 같은 것

<Setter Property="Padding" Value="10,0,0,0" /> 
2

여백 대신 여백을 설정해야하는 것처럼 보입니다.