private List <PanoramaChild> GetCurrentChildren() { var result = new List <PanoramaChild>(); var index = SelectedIndex; // Our "first" element is the element that is selected PanoramaChild lastChild = null; for (var counter = 0; counter < Children.Count; counter++) { if (index > Children.Count - 1) { index = 0; // We wrap back to item 0 when we shoot out the back } if (Children[index].Visibility == Visibility.Visible) { var currentChild = Children[index]; if (lastChild != null && SimpleView.GetFlowsWithPrevious(currentChild)) { lastChild.FloatingElements.Add(currentChild); } else { lastChild = new PanoramaChild { Child = currentChild, ActualChildIndex = index }; result.Add(lastChild); } } index++; } return(result); }
private List<PanoramaChild> GetCurrentChildren() { var result = new List<PanoramaChild>(); var index = SelectedIndex; // Our "first" element is the element that is selected PanoramaChild lastChild = null; for (var counter = 0; counter < Children.Count; counter++) { if (index > Children.Count - 1) index = 0; // We wrap back to item 0 when we shoot out the back if (Children[index].Visibility == Visibility.Visible) { var currentChild = Children[index]; if (lastChild != null && SimpleView.GetFlowsWithPrevious(currentChild)) lastChild.FloatingElements.Add(currentChild); else { lastChild = new PanoramaChild {Child = currentChild, ActualChildIndex = index}; result.Add(lastChild); } } index++; } return result; }