I have tried the following :
ScrollViewer.CanContentScroll=\"True\"
ScrollViewer.HorizontalScrollBarVisibility=\"Visible\"
But it does not seem
There must be a possibility to do it, because Extended WPF Toolkit has done it!
Lets assume that you have e.g. this class:
public class ExampleClass
{
public int LongPropertyNameA;
public int LongPropertyNameB;
public int LongPropertyNameC;
public int LongPropertyNameD;
public int LongPropertyNameE;
public int LongPropertyNameF;
}
The normal approach looks like this:
The Headers are hidden.
The XAML Code looks e.g. like this:
When you use the WPT Toolkit DataGrid Library (called Xceed.Wpf.DataGrid.dll) the grid looks like this with the scrollbars you want:
The XAML Code looks e.g. like this:
where xcdg
is the namespace defined in the Window tag with this XAML Code:
Conclusion:
If you want it very easy download the Xceed WPF Toolkit and use the DataGridControl
.
DataGridControl
Hope it helps!