Exemplo n.º 1
0
 private MeTLInkCanvas visuallyAdjustedVisual(MeTLInkCanvas visual)
 {
     foreach (var box in visual.TextChildren())
     {
         var textbox = (TextBox)box;
         var testSize = new Size(textbox.ActualWidth, textbox.ActualHeight);
         textbox.Measure(testSize);
         textbox.Arrange(new Rect(testSize));
         var lastCharRect = textbox.GetRectFromCharacterIndex(textbox.Text.Count());
         if (textbox.Height < lastCharRect.Bottom)
             textbox.Height = lastCharRect.Bottom;
     }
     return visual;
 }