vicky babu

vicky babu

  • NA
  • 92
  • 1.5k

Issue in Wpf Inverted DataGrid Row, Column Resize

Apr 4 2018 5:42 AM
I am new to WPF, Here I am trying DataGrid with inversion, but my problem is whenever I try to resize the columns and rows it's not resized properly because it was inverted now the rows are resize with vertical and columns are in horizontal.
 
How can I get it to look and behave like in the uninverted DataGrid?
 
Code here:
  1. <DataGrid.ColumnHeaderStyle> 
  2. <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}"> 
  3. <Setter Property="LayoutTransform"> 
  4. <Setter.Value> 
  5. <TransformGroup> 
  6. <RotateTransform Angle="-90"/> 
  7. <ScaleTransform ScaleX="1" ScaleY="-1" /> 
  8. </TransformGroup> 
  9. </Setter.Value> 
  10. </Setter> </Style> 
  11. </DataGrid.ColumnHeaderStyle> 
  12. <DataGrid.CellStyle> 
  13. <Style TargetType="DataGridCell"> 
  14. <Setter Property="LayoutTransform"> 
  15. <Setter.Value> 
  16. <TransformGroup> 
  17. <RotateTransform Angle="-90"/> 
  18. <ScaleTransform ScaleX="1" ScaleY="-1" /> 
  19. </TransformGroup> 
  20. </Setter.Value> 
  21. </Setter> 
  22. </Style> 
  23. </DataGrid.CellStyle> 
  24. <DataGrid.RowHeaderStyle> 
  25. <Style TargetType="DataGridRowHeader"> 
  26. <Setter Property="LayoutTransform"> 
  27. <Setter.Value> 
  28. <TransformGroup> 
  29. <RotateTransform Angle="-90"/> 
  30. <ScaleTransform ScaleX="1" ScaleY="-1" /> 
  31. </TransformGroup> 
  32. </Setter.Value> 
  33. </Setter> 
  34. </Style> 
  35. </DataGrid.RowHeaderStyle>  
thanks in advance