title: Exposing VisualOffsets property
body: <p>I am making an application in C# WPF and need the location of an object that I added to a panel. While debugging I found the VisualOffset property of the object that gives me the relative position. I just can't get the value from the code.</p>
  
  <p><a href="https://i.stack.imgur.com/zJcJ2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zJcJ2.png" alt="UserControl object - VisualOffset"></a></p>
  
  <p>What I would like to do is (though it is not possible):</p>
  
  <pre><code>var display = new Display(); // This is a class that inhereit UserControl
  .
  .
  // At some point when display is added to a panel
  var position = display.VisualOffset; // This property is not accessible
  </code></pre>
  
  <p>So how can I get the relative position of an object?</p>