title: Binding to a ScrollViewer's ViewportWidth and ViewportHeight
body: <p>I am using the Model-View-ViewModel architecture in a WPF application I am building, and I would like a specific ViewModel to actually be reactive to the size of the view (not a normal use-case of the MVVM approach, I know).</p>
  
  <p>Essentially, I have a ScrollViewer object and I want the viewmodel to observe the width and height of the scrollviewer and then be able to do things accordingly depending on what that width and height are.</p>
  
  <p>I'd like to do something like this:</p>
  
  <pre><code>&lt;ScrollViewer ViewportWidth="{Binding Path=MyViewportWidth, Mode=OneWayToSource}" ViewportHeight="{Binding Path=MyViewportHeight, Mode=OneWayToSource}" /&gt;
  </code></pre>
  
  <p>But of course this is impossible to do because "ViewportWidth" and "ViewportHeight" cannot be "bound to" (a.k.a. act as binding targets) because they are read-only dependency properties (even though I am not writing to them at all in this binding since it is OneWayToSource).</p>
  
  <p>Anyone know of a good method to be able to do something like this?</p>