我得到了ListView
这样的话:
我的DataTemplate
看起来像这样:
<DataTemplate>
<WrapPanel>
<TextBlock Name="tbDoc" FontFamily="{StaticResource FontAwesome}" Text="" Padding="2" Style="{StaticResource tbDocStyle}" Visibility="{Binding HasDocs, Converter={StaticResource VisibilityConverter}}" />
<TextBlock Name="tbPart" FontFamily="{StaticResource FontAwesome}" Text="" Padding="2" Style="{StaticResource tbPartStyle}" Visibility="{Binding ET, Converter={StaticResource VisibilityConverter}}" />
<TextBlock Text="{Binding DisplayText}" />
</WrapPanel>
</DataTemplate>
所以前两个TextBlock
是固定的,最后TextBlock
应该包裹他的文字,如果它太长,但是WrapPanel
它包裹了整个TextBlock
远离前两个......我怎么能做到这一点?