사이에 적절한 간격을위한 여러 가지 방법으로
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0">
<Textblock Text="Today"/>
<Textblock Text="Cappuccino Fudge"/>
</StackPanel>
<TextBlock Text="Cupcakes" Grid.Row="1"/>
</Grid>
사용 마진을 달성 할 수있다 당신은 XAML에서
<Run />
요소를 살펴 보았다 했습니까? 당신은 포맷팅 등을 할 수 있습니다.
는 완벽하지 이미지에 근접하지만, 물론 :). 질문은, 당신은 3 개의 텍스트 모두를 묶고 싶습니까?
<Grid Width="250" Height="70" Background="#FF8D3838">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Bottom" Margin="20,0,5,0">
<Run Text=" TODAY " Background="#FF722828" Foreground="AntiqueWhite" />
<Run Text=" Cappuccino Fudge" FontSize="20" Foreground="White"/>
</TextBlock>
<TextBlock Grid.Row="1" Text="CupCakes" Foreground="White" VerticalAlignment="Top" FontSize="20" Margin="20,0,5,0"/>
</Grid>
나는 지하철에서 작동하는지 잘 모릅니다. – blindmeis
예,하지만 저는 textblock이 백그라운드 속성을 가질 수 없다는 것을 알고있었습니다. 나는 그걸 다루고있다 –
고마워! 저건 완벽 해! –