title: Awesomium WebControl WPF seems to misinterpret Scaling
body: <p>I'm trying to build a simple prototype (that use Awesomium 1.7 RC3) that allows a WPF application to display a WebPage, allowing the page to be zoomed in / out. I don't want to preserve the layout, but adapt the layout in the same manner that you can resize the window. It's the same behavior as the zoom feature of Internet Explorer. The logical display area is raised while the actual rendering is zoomed.</p>
  <p>For exemple, here is a screenshot of the app with a 100% zoom:</p>
  <p><img src="https://i.stack.imgur.com/9LsTy.png" alt="Zoom 100%" />
  <a href="https://i.stack.imgur.com/Cs4FH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cs4FH.png" alt="Zoom 100%" /></a><br />
  <sub>(source: <a href="https://hand-net.com/temp/zoom100_2.PNG" rel="nofollow noreferrer">hand-net.com</a>)</sub></p>
  <p>The upper slider allows to control the zoom. When I change the zoom to 90% or 110%, here is what I get:</p>
  <p><img src="https://i.stack.imgur.com/R9Lko.png" alt="Zoom 90%" />
  <a href="https://i.stack.imgur.com/NNBBv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NNBBv.png" alt="Zoom 90%" /></a><br />
  <sub>(source: <a href="https://hand-net.com/temp/zoom90_2.PNG" rel="nofollow noreferrer">hand-net.com</a>)</sub></p>
  <p>And</p>
  <p><img src="https://i.stack.imgur.com/FFAqH.png" alt="Zoom 110%" />
  <a href="https://i.stack.imgur.com/Mamlq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mamlq.png" alt="Zoom 110%" /></a><br />
  <sub>(source: <a href="https://hand-net.com/temp/zoom110_2.PNG" rel="nofollow noreferrer">hand-net.com</a>)</sub></p>
  <p>As you can see, the browser rendering is messy. Not only the internal rendering does not match the WebBrowser control area, but the picture resizing has a very low quality.</p>
  <p>All of this were properly working with Awesomium 1.6.6.</p>
  <p>How can I get the desired result?</p>
  <p>The sample application can be downloaded <a href="http://hand-net.com/temp/WpfApplication1.zip" rel="nofollow noreferrer">here</a>. The key parts are :</p>
  <p>Xaml :</p>
  <pre><code>    &lt;Slider Value=&quot;{Binding Path=Zoom, Mode=TwoWay}&quot;
              IsSnapToTickEnabled=&quot;True&quot;
              TickPlacement=&quot;Both&quot;
              Grid.ColumnSpan=&quot;2&quot;
              Minimum=&quot;0.1&quot;
              Maximum=&quot;2.0&quot;
              TickFrequency=&quot;0.1&quot;
              LargeChange=&quot;0.1&quot; /&gt;
  
      &lt;Grid x:Name=&quot;Container&quot;
            Background=&quot;SaddleBrown&quot;
            Grid.Row=&quot;1&quot;
            utils:SizeObserver.Observe=&quot;true&quot;
            utils:SizeObserver.ObservedWidth=&quot;{Binding ContainerActualWidth, Mode=OneWayToSource}&quot;
            utils:SizeObserver.ObservedHeight=&quot;{Binding ContainerActualHeight, Mode=OneWayToSource}&quot;&gt;
          &lt;Grid x:Name=&quot;Containee&quot;
                Background=&quot;LightBlue&quot;
                RenderTransformOrigin=&quot;0,0&quot;
                Width=&quot;{Binding ContaineeWidth, Mode=OneWay}&quot;
                Height=&quot;{Binding ContaineeHeight, Mode=OneWay}&quot;&gt;
              &lt;Grid.LayoutTransform&gt;
                  &lt;TransformGroup&gt;
                      &lt;ScaleTransform ScaleX=&quot;{Binding Zoom, Mode=OneWay}&quot;
                                      ScaleY=&quot;{Binding Zoom, Mode=OneWay}&quot; /&gt;
                      &lt;SkewTransform /&gt;
                      &lt;RotateTransform /&gt;
                      &lt;TranslateTransform /&gt;
                  &lt;/TransformGroup&gt;
              &lt;/Grid.LayoutTransform&gt;
              &lt;awe:WebControl Source=&quot;http://www.flickr.com/search/?q=strasbourg&amp;amp;z=m&quot; /&gt;
          &lt;/Grid&gt;
      &lt;/Grid&gt;
  </code></pre>
  <p>ViewModel that is used as DataContext:</p>
  <pre><code>public class ViewPortViewModel : INotifyPropertyChanged
  {
      public event PropertyChangedEventHandler PropertyChanged;
  
      protected virtual void RaisePropertyChanged(string propertyName)
      {
          Debug.WriteLine(&quot;Property changes: &quot; + propertyName);
          if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
  
      private double m_Zoom = 1D;
  
      public double Zoom
      {
          get { return m_Zoom; }
          set
          {
              if (value != m_Zoom)
              {
                  m_Zoom = value;
                  RaisePropertyChanged(&quot;Zoom&quot;);
                  RaisePropertyChanged(&quot;ContaineeWidth&quot;);
                  RaisePropertyChanged(&quot;ContaineeHeight&quot;);
              }
          }
      }
  
      private double m_ContainerActualWidth = 100D;
  
      public double ContainerActualWidth
      {
          get { return m_ContainerActualWidth; }
          set
          {
              if (value != m_ContainerActualWidth)
              {
                  m_ContainerActualWidth = value;
                  RaisePropertyChanged(&quot;ContainerActualWidth&quot;);
                  RaisePropertyChanged(&quot;ContaineeWidth&quot;);
              }
          }
      }
  
      private double m_ContainerActualHeight = 100D;
  
      public double ContainerActualHeight
      {
          get { return m_ContainerActualHeight; }
          set
          {
              if (value != m_ContainerActualHeight)
              {
                  m_ContainerActualHeight = value;
                  RaisePropertyChanged(&quot;ContainerActualHeight&quot;);
                  RaisePropertyChanged(&quot;ContaineeHeight&quot;);
              }
          }
      }
  
      public double ContaineeWidth
      {
          get { return m_ContainerActualWidth / Zoom; }
      }
  
      public double ContaineeHeight
      {
          get { return m_ContainerActualHeight / Zoom; }
      }
  </code></pre>