title: Problems changing shape's size in Visio Drawing Control (hosted in a WPF application)
body: <p>I'm working on a project that involves the use of Visio's Drawing Control hoseted in a WPF application. I'm able to host the control and use it in my application but I'm having some problems with resizing the shapes.</p>
  
  <p>Here's the problem.
  in the ShapeAdded event handler I'm trying to change the shape's size using this code</p>
  
  <pre><code>e.shape.get_CellsSRC(
      (short)Microsoft.Office.Interop.Visio.VisSectionIndices.
      visSectionObject,
      (short)Microsoft.Office.Interop.Visio.VisRowIndices.
      visRowXFormOut,
      (short)Microsoft.Office.Interop.Visio.VisCellIndices.
      visXFormHeight).set_Result("CM", height);
  
  e.shape.get_CellsSRC(
      (short)Microsoft.Office.Interop.Visio.VisSectionIndices.
      visSectionObject,
      (short)Microsoft.Office.Interop.Visio.VisRowIndices.
      visRowXFormOut,
      (short)Microsoft.Office.Interop.Visio.VisCellIndices.
      visXFormWidth).set_Result("CM", width);
  </code></pre>
  
  <p>This code seems to work but happens as follows:</p>
  
  <ul>
  <li>the shape has in the drawing control exactly width and height specified (accordingly to the rulers)</li>
  <li>the height and width of the shape are multiplied by 96. </li>
  </ul>
  
  <p>So if I use height = width = 1 I get a shape that on the paper is 1cm * 1cm but in its properties it says it is 96cm*96cm.
  I think it's a problem related to Device Indipendent Units of WPF, but I don't figure out how to solve.</p>
  
  <p>Hope you can help me.
  Thanks!
  Cheers.
  -Francesco</p>