ControlUtils: Fix ScrollIntoView()
This commit is contained in:
1 parent
545033daf5
commit
afc143e1e4
1 file changed
+4
-4
@@ -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