views:

48

answers:

2

I have a DataGrid inside a ScrollViewer.

I want the whole thing to only be 200 pixels high.

But this code:

<ScrollViewer x:Name="DataGridArea" Height="200">
    <toolkit:DataGrid ItemsSource="{Binding FieldChanges}"/>
</ScrollViewer>

produces this with the scrollbar only on the right side:

alt text

and I can only see the scrollbar when I scroll down to the bottom:

alt text

What do I have to do so that my ScrollViewer is 200 pixels high AND both scrollbars are present at all times?

+1  A: 

What happens if you set VerticalScrollBarVisibility and HorisontalScrollBarVisibility to Visible on the ScrollViewer ?

klausbyskov
A: 

I think you need to set the height of the ScrollViewer's content (the DataGrid).

Number8