Search code examples
windows-phone-7textblock

WP7: Two parallel TextBlocks with a "fluid" layout


How to create a layout like this? It has two textblocks that are next to each other, on the same line. Both (or at least the latter one) have textwrap in them.

Stackpanel doesn't seem to work, because it will leave a wide margin on the left for the 2nd textblock - the same with a Grid. Those look like two columns. I'd like the textblock2 to flow below the textblock1.

Two textblocks


Solution

  • I would use a WrapPanel (In the WP7 ToolKit)

    You'll basically have a WrapPanel with 2 TextBlocks in it and it will do exactly what you want