|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using Avalonia.Automation.Provider; |
|
|
|
using Avalonia.Automation.Provider; |
|
|
|
using Avalonia.Controls; |
|
|
|
using Avalonia.Controls.Primitives; |
|
|
|
using Avalonia.Controls.Selection; |
|
|
|
@ -64,7 +63,7 @@ namespace Avalonia.Automation.Peers |
|
|
|
if (Owner.Parent is ItemsControl parent && |
|
|
|
parent.GetValue(ListBox.SelectionProperty) is ISelectionModel selectionModel) |
|
|
|
{ |
|
|
|
var index = parent.ItemContainerGenerator.IndexFromContainer(Owner); |
|
|
|
var index = parent.IndexFromContainer(Owner); |
|
|
|
|
|
|
|
if (index != -1) |
|
|
|
selectionModel.Deselect(index); |
|
|
|
|