Windows 8 WrapPanel

后端 未结 4 1766
囚心锁ツ
囚心锁ツ 2021-01-12 01:37

I\'ve got problem with automatically breaking StackPanel into next line. Here\'s the sample code:

         


        
4条回答
  •  没有蜡笔的小新
    2021-01-12 02:13

    Use VariabeSizedWrapGrid instead of StackPanel, see http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.variablesizedwrapgrid.aspx

    For the multiple TextBlocks, consider using a single textBlock with multiple Runs. Your Image can of course not be included in the runs, but one TextBlock with two Runs is better than two consecutive TextBlocks.

    UPDATE: This might actually not help you at all to get the layout you want. You may have to look at the RichTextBlock control, see http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.richtextblock.aspx

提交回复
热议问题