title: Problem getting the actual width of control before rendering in wpf
body: <p>I have a wpf window that hosts a control.
  The window's height and width are set to <code>SizeToControl</code>.</p>
  
  <p>Now I need to position this Window relative to the position of its parent window.(basically the Top right position).</p>
  
  <p>(So my windows <code>Top = ParentWindow.Top, and Left = ParentWindow.Left + ParentWindow.ActualWidth - control.ActualWidth</code> so that my window is positioned inside the parent window but to its right corner)</p>
  
  <p>So i will need to set the Top and Left of the window. To do this I need the Actual Width of the control that is being hosted inside it....but I can only get this once I actually do,</p>
  
  <p><code>Window.Show(control,parent)</code></p>
  
  <p>Is there a way to get around this problem? How do I get the actual rendered width of the control before it is actually shown?</p>
  
  <p>Thanks!</p>