A solution similar to Seb’s but probably with better performance :
for(int i = 0; i < itemsControl.Items.Count; i++)
{
UIElement uiElement =
(UIElement)itemsControl.ItemContainerGenerator.ContainerFromIndex(i);
}
More Related Contents:
- Setting Canvas properties in an ItemsControl DataTemplate
- How can a separator be added between items in an ItemsControl
- How to programmatically select an item in a WPF TreeView?
- How to get a List collection of values from app.config in WPF?
- Binding to custom control inside DataTemplate for ItemsControl
- Difference between ObservableCollection and BindingList
- Window vs Page vs UserControl for WPF navigation?
- When to use BlockingCollection and when ConcurrentBag instead of List?
- Adding placeholder text to textbox
- WPF chart controls [closed]
- WPF: Binding a ContextMenu to an MVVM Command
- Listen to changes of dependency property
- Data Binding in WPF User Controls
- Task continuation on UI thread
- WPF Binding a ListBox to an enum, displaying the Description Attribute
- Retry a task multiple times based on user input in case of an exception in task
- WPF iterate through datagrid
- WPF Binding – Default value for empty string
- WPF: Cannot reuse window after it has been closed
- WPF: The name does not exist in the namespace [duplicate]
- How can you bind to a DynamicResource so you can use a Converter or StringFormat, etc.? (Revision 4)
- What is the simplest C# function to parse a JSON string into an object? [closed]
- Paste Event in a WPF TextBox
- Resize WPF Window and contents depening on screen resolution
- How to use Resources.resx to link images
- When should I use dependency properties in WPF?
- Dynamically loading resource dictionary files to a wpf application gives an error
- WPF MVVM: how to bind GridViewColumn to ViewModel-Collection?
- How to Print Preview when using a DocumentPaginator to print?
- TreeView, HierarchicalDataTemplate and recursive Data