windows phone 7 - Check if the WrapPanel is overflowed? -


i'm doing pagination things. know if can check whether textblock inside of wrappanel overflowed or not? way ask if know pagination please give me tuts. i'm doing split big sized string pages , display them phone screen. thanks.

microsoft.phone.controls.wrappanel wrappanel = new   microsoft.phone.controls.wrappanel(); wrappanel.width = calculatedwidth; wrappanel.height = calculatedheight; wrappanel.margin = new thickness(pageformat.leftmargin,pageformat.topmargin,pageformat.rightmargin,pageformat.bottommargin);  textblock tbl = new textblock(); tbl.text = " text here ... ";  wrappanel.children.add(tbl); 

since mango sdk, there property call texttrimming.

so xaml

<textblock text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" texttrimming="wordellipsis" width="200" /> 

will produce somehting "aaaaaaa....."

so code like:

tb1.textwrapping=textwrapping.wordellipsis

edit there property called wrap u can set both in xaml , c#. <textblock text={binding text} textwarapping="wrap" />

or in c# as

mytextblock.textwrapping=textwrapping.wrap;


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -