title: Rotating DataGridCell will impact the scrollviewer - WPF
body: <p>I am working with a inverted DataGrid (columns => rows).
  When I'm scrolling down, the elements are cropped horizontally instead of vertically as it is expected. I supposed that the problem is coming from the scrollviewer and it's ContentHorizontalOffset. As it is inverted, it should be vertical.</p>
  
  <p><strong>What I am getting:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/poz3c.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/poz3c.jpg" alt="enter image description here"></a></p>
  
  <p><strong>What I want:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/HmvDv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HmvDv.jpg" alt="enter image description here"></a></p>
  
  <p>How can I change that ?</p>
  
  <p>Here some code of what I am doing (based on <a href="https://stackoverflow.com/questions/4132829/wpf-horizontal-datagrid">this</a> and <a href="https://rotatedwpfdatagrid.codeplex.com/" rel="nofollow noreferrer">this</a> ):</p>
  
  <pre><code>&lt;DataGrid x:Name="MyRotatedDataGrid" HorizontalContentAlignment="Center"
                       ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" 
                       AutoGenerateColumns="True"
                       ItemsSource="{Binding Customers}"&gt;
              &lt;DataGrid.Resources&gt;
                  &lt;Style x:Key="DataGridBase" TargetType="Control"&gt;
                      &lt;Setter Property="LayoutTransform"&gt;
                          &lt;Setter.Value&gt;
                              &lt;TransformGroup&gt;
                                  &lt;RotateTransform Angle="-90" /&gt;
                                  &lt;ScaleTransform ScaleX="1" ScaleY="-1" /&gt;
                              &lt;/TransformGroup&gt;
                          &lt;/Setter.Value&gt;
                      &lt;/Setter&gt;
                      &lt;Setter Property="TextOptions.TextFormattingMode" Value="Display" /&gt;
                  &lt;/Style &gt;
                  &lt;Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridBase}"/&gt;
                  &lt;Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource DataGridBase}"/&gt;
                  &lt;Style TargetType="DataGridRowHeader" BasedOn="{StaticResource DataGridBase}"/&gt;
              &lt;/DataGrid.Resources&gt;
  
              &lt;DataGrid.LayoutTransform&gt;
                  &lt;TransformGroup&gt;
                      &lt;RotateTransform Angle="90" /&gt;
                      &lt;MatrixTransform Matrix="-1, 0, 0, 1, 0, 0" /&gt;
                  &lt;/TransformGroup&gt;
              &lt;/DataGrid.LayoutTransform&gt;
  </code></pre>