title: Printing Visual with WPF
body: <p>I have a paginator for visuals. The problem is that when i create the visual from code i have to call Measure and Arrange. But i want to give them infinity value.</p>
  
  <pre><code>  stackpanel.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
    stackpanel.Arrange(new Rect(new Size(double.PositiveInfinity, double.PositiveInfinity)));
  </code></pre>
  
  <p>This causes </p>
  
  <blockquote>
    <p>Cannot call Arrange on a UIElement with infinite size or NaN. Parent
    of type 'System.Windows.Controls.StackPanel' invokes the UIElement.
    Arrange called on element of type
    'System.Windows.Controls.StackPanel'.</p>
  </blockquote>