title: Compute the visible length of a notification in the WP8.1 action center
body: <p>as you can see below (screenshot from <a href="https://www.microsoft.com/nl-nl/windows/windows-10-mobile-upgrade?rtc=1" rel="nofollow noreferrer">windowsphone.com</a>), a notification in the notification center of WP8.1 can only be <strong>one line</strong> long (potentially with an additional &quot;title&quot; line - see Mail to &quot;Maurice&quot; here under).</p>
  <p><a href="https://i.stack.imgur.com/OGhZ2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OGhZ2.png" alt="Notification Center" /></a><br />
  <sub>(source: <a href="https://assets.windowsphone.com/307b9d9e-8a75-4ef5-a549-dcd2890f7891/action-center-full-callout_InvariantCulture_Default.png" rel="nofollow noreferrer">windowsphone.com</a>)</sub></p>
  <p>My app sends notifications to the action center, and I would like to pre-compute the length of the notification i.e. know if it fits in the screen or not.</p>
  <p>In case of a standard text, I can use <a href="https://stackoverflow.com/questions/20848815/wp8-xaml-measure-string-length-in-pixels">an invisible text</a> to compute the length of the rendered text. But in this case, the problem is that the text is not part of <strong>MY</strong> UI, but part of the action center... and I have no idea which style is used and if some ease-of-use presets (UI zooming) are set.</p>
  <p>Any idea how I could approach this problem?</p>
  <p><em>Edit as discussed in the comments:</em></p>
  <ol>
  <li><p>I tried an &quot;averageing&quot; approach by estimating the font size and the average size of a sentence. Unfortunately, the string is not long enough that the dispersion flattens out, &quot;iii&quot; is way shorter than &quot;mmm&quot; and fixing the length at say - 32 chars - will produce too unreliable results.</p>
  </li>
  <li><p>The ease of access zoom factor is a dealbreaker here since it can cut the length of the displayed text in up to a half.</p>
  </li>
  </ol>