4 using System.Collections.Generic;
7 using System.Threading.Tasks;
9 using System.Windows.Controls;
10 using System.Windows.Media;
12 namespace SiliconStudio.Presentation.Extensions
20 while (parent != null && (parent is
ItemsControl) ==
false)
21 parent = VisualTreeHelper.GetParent(parent);
23 return parent as ItemsControl;
28 ItemContainerGenerator gen = itemsControl.ItemContainerGenerator;
30 foreach (var item
in gen.Items)
32 var container = gen.ContainerFromItem(item) as
ItemsControl;
33 if (container != null)
34 yield
return container;
static IEnumerable< ItemsControl > GetChildContainers(this ItemsControl itemsControl)
static ItemsControl GetParentContainer(this ItemsControl itemsControl)