title: Set Width of TextBox in XAML so it'll be able to display x digits
body: <p>I would like to set the Width of a WPF TextBox so that it will have enough space for, say, any TCP port number with 5 digits. It should not be larger, and it should not resize dynamically, i.e. Width="Auto" is not what I want.</p>
  
  <p>I'm looking for a generic way, i.e. one that respects the font used, and I don't want to have to fiddle around with a pixel-exact Width value when the font - or anything else that might change the pixel width of 5 digits - is changed.</p>
  
  <p>I guess it would be possible - if awkward - to do in code via MeasureString, but <strong>is this possible in XAML?</strong></p>