3
我正在處理我的第一個Windows 8應用程序(C#/ XAML),並且希望在段落開頭處包含首字下沉。任何人有一個想法如何做到這一點?如何在Windows 8 C#XAML應用程序中刪除上限
我正在處理我的第一個Windows 8應用程序(C#/ XAML),並且希望在段落開頭處包含首字下沉。任何人有一個想法如何做到這一點?如何在Windows 8 C#XAML應用程序中刪除上限
您可以在Grid
內結合RichTextBlock
和RichTextBlockOverflow
:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<RichTextBlock FontSize="48" FontFamily="Cambria" Margin="12" OverflowContentTarget="{Binding ElementName=o2}">
<Paragraph FontSize="122">L</Paragraph>
<Paragraph>orem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus.
Phasellus pharetra nulla ac diam. Quisque semper justo at risus. Donec venenatis, turpis vel hendrerit
interdum, dui ligula ultricies purus, sed posuere libero dui id orci. Nam congue, pede vitae dapibus
aliquet, elit magna vulputate arcu, vel tempus metus leo non est. Etiam sit amet lectus quis est
congue mollis. Phasellus congue lacus eget neque. Phasellus ornare, ante vitae consectetuer consequat,
purus sapien ultricies dolor, et mollis pede metus eget nisi. Praesent sodales velit quis augue.
Cras suscipit, urna at aliquam rhoncus, urna quam viverra nisi, in interdum massa nibh nec erat.</Paragraph>
</RichTextBlock>
<RichTextBlockOverflow Name="o2" Grid.Column="1" Grid.ColumnSpan="3" Margin="12" OverflowContentTarget="{Binding ElementName=o3}" />
<RichTextBlockOverflow Name="o3" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3" />
</Grid>
看起來: