I\'m using this snippet to analyze the rows I\'ve selected on a datagrid.
for (int i = 0; i < dgDetalle.Items.Count; i++) { DataGridRow row = (DataGri
Use this subscription:
TheListBox.ItemContainerGenerator.StatusChanged += (sender, e) => { TheListBox.Dispatcher.Invoke(() => { var TheOne = TheListBox.ItemContainerGenerator.ContainerFromIndex(0) as ListBoxItem; if (TheOne != null) // Use The One }); };