
我想要包含数据的文本块.我无法做到.
有人能看出问题是什么吗?
谢谢!!
Ĵ
<DataTemplate x:Key="policyLbTemplate"> <StackPanel> <TextBlock Text="{Binding name}" FontWeight="Bold"/> <TextBlock Text="{Binding description}" textwrapPing="Wrap" /> </StackPanel> </DataTemplate> <ListBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ItemsSource="{Binding PolicIEs}" ItemTemplate="{StaticResource policyLbTemplate}" HorizontalContentAlignment="Stretch" />解决方法 这很可能是因为没有任何限制TextBlock的宽度,因此它在屏幕外增长.是否出现水平滚动条? 请参阅以下相关问题并尝试所述解决方案:
WP7 TextBlock inside a ListBox not wrapping text
Force TextBlock to wrap in WPF ListBox
windows phone 7 TextBlock TextWrapping not honored in listbox
http://social.msdn.microsoft.com/forums/en-US/wpf/thread/37236ac6-05c3-4acc-baca-abc871ba64e0
总结以上是内存溢出为你收集整理的列表框中的Silverlight文本块未包装全部内容,希望文章能够帮你解决列表框中的Silverlight文本块未包装所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)