■ xml:space 속성을 사용해 XAML에서 문자열 공백을 유지하는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="200"> <TextBlock Style="{StaticResource SubheaderTextBlockStyle}" Text="Privacy" /> <TextBlock TextWrapping="WrapWholeWords"> <Span xml:space="preserve"><Run>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Read the </Run><Hyperlink NavigateUri="https://icodebroker.com">Contoso Privacy Statement</Hyperlink><Run> in your browser.</Run> Donec pharetra, enim sit amet mattis tincidunt, felis nisi semper lectus, vel porta diam nisi in augue.</Span> </TextBlock> </StackPanel> |