title: If label's text width is greater than total width of its container then show sub-string using intelligence of pixels
body: <p>I want to do this : If label's text width  is greater than total width of its container 
  then show sub-string of the label rather than showing the full label's text.
  In c# : currently am using following Code</p>
  
  <pre><code> if (SensorType.Text.Length &gt;= 25) {
      SensorType.Text = SensorType.Text.Substring(0, 20) + "...";
  }
  </code></pre>
  
  <p>its working but it ignore pixels or Area of Specific .div
  is there any thing to sense div pixels </p>