有没有办法在WPF中从WinForms实现这个功能?
我正在尝试在 WPF ListView 中手动设置 焦点(而不是选择)。来自System.Windows.Controls。 谢谢。
ListView.FocusedItem = ListView.Items[itemToFocusIndex]
我正在尝试在 WPF ListView 中手动设置 焦点(而不是选择)。来自System.Windows.Controls。 谢谢。
UIElement
的控件都实现了IInputElement
接口。从myListView.Items[itemIndex]
中获取的是什么类型的对象? - Adi LesterListView.UpdateLayout()
。然后调用...ContainerFromIndex
就不会为空。 - The Muffin Man