title: In WPF,UseLayoutRounding="True" causes controls to be clipped
body: <p>I have created a code that dynamically creates and populates controls(ComboBox,Button,TextBox) into the UI.They were populating fine</p>
  
  <p>But I needed to add background image for the UI,that was blurry, so I set </p>
  
  <pre><code>UserLayoutRounding = True
  </code></pre>
  
  <p>Now, few of the dynamically populated controls are showing clipped in the screen.  </p>
  
  <p><a href="https://i.stack.imgur.com/sqIcV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sqIcV.png" alt="Button with the clipped end"></a></p>
  
  <p>I read this <a href="https://stackoverflow.com/questions/23500188/wpf-textblock-textwrapping-causes-text-to-be-clipped">WPF TextBlock Textwrapping Causes Text to be Clipped</a>. I guess I have similar problem, is there any property for ComboBox and Button like TextOption.TextFormatting for TextBlock</p>
  
  <p>Note: I set margin of the control as </p>
  
  <pre><code>control.Margin =  new Thickness(310.4780282,491.571753,0,0) 
  </code></pre>
  
  <p>The above causes clipping whereas</p>
  
  <pre><code>control.Margin = new Thickness(310.5296382,491.571753,0,0)
  </code></pre>
  
  <p>appears properly . So only for few values of the margin decimal, it occurs, is there any way to detect the values that will cause clipping and fix it.</p>