private void GetScrollViewers() { _scrollViewers.Clear(); foreach (var box in CustomBoxesInfo.Instance.CustomListBoxes) { foreach (var viewer in VisualChildHelper.FindVisualChildren <ScrollViewer>(box)) { _scrollViewers.Add(viewer); } } }
private void SetItemsTemplates() { var panel = VisualChildHelper.FindVisualChildren <VirtualizingStackPanel>(this).FirstOrDefault(); _itemsTemplates = VisualChildHelper.FindDirectChildren <FrameworkElement>(panel).ToList(); }