本頁是否能提供幫助?
您對此內容的意見反應十分重要。 請告訴我們您的想法。
其他意見反應?
剩餘 1500 個字元
MSDN Library
EN
本內容沒有您的語言版本,但有英文版本。

ItemsControl.ItemContainerGenerator Property

Gets the ItemContainerGenerator associated with this ItemsControl.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

public ItemContainerGenerator ItemContainerGenerator { get; }

You can use the ItemContainerGenerator to retrieve items based on their index or containers by specifying the data item. For example, if you have a data-bound ItemsControl, and you want to obtain an item based on its index, you can use the ItemContainerGenerator.ContainerFromIndex method. If you want to retrieve the data item, use ItemContainerGenerator.ItemFromContainer method.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

顯示:
© 2015 Microsoft