Wrap a group of TextBlocks inside StackPanel in Windows Phone -


this code.

<stackpanel orientation="horizontal">     <textblock name="link1" text="this link1"></textblock>     <textblock name="text1" text=" text "></textblock>     <textblock name="link2" text="this link2"></textblock>     <textblock name="text2" text=" other text "></textblock>     <textblock name="link3" text="this link3></textblock> </stackpanel> 

now stackpanel go out of screen. want wrap contents of go next line on screen end.

i not using <run> property of textblock defining because want register tap event textblocks defined links in above code. using buttons , hyperlinks not desired here. buttons having same issue of wrapping content.

any or suggestions?

i see 3 options here:

  1. use richtextbox
  2. hoist wrappanel windows phone toolkit
  3. write own panel

i think #1 should preferred approach, assuming can make fit requirements. richtextbox can contain plain text inline hyperlinks -- latter not expose tap event, have click may suffice.

failing that, #2 should straightforward, , may suffice if can work limitation wrappanel treat textblocks atoms (ie, won't wrap intra-textblock text).

approach #3 allow more flexibility in theory, take amount of effort , expertise implement. might face hassles down road when might need adapt custom panel new or unforeseen requirements.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -