Could you insert your code? Because what you are asking for can simply be achieved by placing the DataGrid in a panel that will not limit its size and arrange exactly within the required size of the control.
In other words, you can put it inside a StackPanel with a vertical orientation and that it:
<Window x:Class="WpfApplication5.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dg="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" Title="Grid Sample" Height="300" Width="300"> <StackPanel> <dg:DataGrid ItemsSource="{Binding}"> <dg:DataGrid.Columns> <dg:DataGridTextColumn Header="No." Width="SizeToCells" Binding="{Binding CheckNumber}" IsReadOnly="True" /> <dg:DataGridTextColumn Header="Date" Binding="{Binding Date, StringFormat=d}" /> <dg:DataGridTextColumn Header="Pay To" MinWidth="200" Binding="{Binding Recipient}" CanUserSort="False" /> </dg:DataGrid.Columns> </dg:DataGrid> </StackPanel> </Window>
source share