如何获取数据绑定ListBox的虚拟项?

如果我有一个汽车列表绑定到
ListBox
。 我现在想要实现第一项最初聚焦,另外我想在显示的ListBox项之间实现全键盘导航,因此我需要访问虚拟创建的项控件。 问题是
itemStack.Items[i]
返回
Car
本身而不是
CarEditControl
。如何获得虚拟创建的项目?
   <ObjectDataProvider x:Key="ItemSource" d:IsDataSource="True"/>

    <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
        <StackPanel IsItemsHost="True"/>
    </ItemsPanelTemplate>

    <DataTemplate x:Key="ItemCollectionTemplate">
        <StackPanel>
            <custom:Item x:Name="item" Car="{Binding Path=.,Mode=OneWay}" />
        </StackPanel>
    </DataTemplate>
    
已邀请:

要回复问题请先登录注册