ControlUtils: Fix ScrollIntoView()
This commit is contained in:
@ -183,10 +183,10 @@ namespace Elwig.Helpers {
|
||||
} else {
|
||||
input.SelectedItem = GetItemFromSource(input.ItemsSource, (int)hash);
|
||||
}
|
||||
if (input is ListBox lb) {
|
||||
lb.ScrollIntoView(lb.SelectedItem);
|
||||
} else if (input is DataGrid dg) {
|
||||
dg.ScrollIntoView(dg.SelectedItem);
|
||||
if (input is ListBox lb && lb.SelectedItem is object lbItem) {
|
||||
lb.ScrollIntoView(lbItem);
|
||||
} else if (input is DataGrid dg && dg.SelectedItem is object dgItem) {
|
||||
dg.ScrollIntoView(dgItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user