0
Resolved with this code:
<Grid VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Toolbar Command -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" Visibility="Visible" Grid.Row="0">
[MY CONTENT]
</StackPanel>
<DataGrid Name="dgSample" Grid.Row="1">
<DataGrid.Columns>
...
</DataGrid.Columns>
</DataGrid>
</Grid>
0
Add your datagrid inside ScrollViewerLike
<ScrollViewer VerticalScrollBarVisibility="Auto" Height="Auto">
<DataGrid>
</DataGrid>
</ScrollViewer >
Avoid uses of Margin and heights if you are using scrollviewer