Я думаю, что проблема может быть в другом месте.Я попробовал ваш код локально и создал некоторые данные.См. Ниже:
<UserControl x:Class="ControlSandbox.StackOverflowQuestion"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid x:Name="Root">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<DataGrid Grid.Row="0" Name="dg" ItemsSource="{Binding Data}">
<DataGrid.Columns>
<DataGridTextColumn Header="Col1" Binding="{Binding Item1}" />
<DataGridTextColumn Header="Col1" Binding="{Binding Item2}"/>
</DataGrid.Columns>
</DataGrid>
<GroupBox Grid.Row="2" Margin="5">
<Button>Click</Button>
</GroupBox>
</Grid>
Я создал некоторые данные, например, так:
public partial class StackOverflowQuestion : UserControl
{
public StackOverflowQuestion()
{
Data = new ObservableCollection<Tuple<string, string>>();
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
Data.Add(new Tuple<string, string>("test", "test"));
InitializeComponent();
Root.DataContext = this;
}
public ObservableCollection<Tuple<String, String>> Data {
get;
set;
}
}
В результате получается правильно прокрученный элемент управления:
И в другом направлении:
Если я не совсем понимаю ваш вопрос?
ОБНОВЛЕНИЕ: добавлен полный экранвыстрел: