void LongList_GroupViewOpened(object sender, GroupViewOpenedEventArgs e) { if (buttonPressed) { LongList.CloseGroupView(); } buttonPressed = false; }
private void conversionsLongListSelector_GroupViewOpened(object sender, GroupViewOpenedEventArgs e) { //Hold a reference to the active long list selector. currentSelector = sender as LongListSelector; //Dispatch the swivel animation for performance on the UI thread. Dispatcher.BeginInvoke(() => { //Construct and begin a swivel animation to pop in the group view. IEasingFunction quadraticEase = new QuadraticEase { EasingMode = EasingMode.EaseOut }; Storyboard _swivelShow = new Storyboard(); _swivelShow.SetValue(NameProperty, "_swivelShowStoryboard"); ItemsControl groupItems = e.ItemsControl; foreach (var item in groupItems.Items) { UIElement container = groupItems.ItemContainerGenerator.ContainerFromItem(item) as UIElement; if (container != null) { Border content = VisualTreeHelper.GetChild(container, 0) as Border; if (content != null) { DoubleAnimationUsingKeyFrames showAnimation = new DoubleAnimationUsingKeyFrames(); EasingDoubleKeyFrame showKeyFrame1 = new EasingDoubleKeyFrame(); showKeyFrame1.KeyTime = TimeSpan.FromMilliseconds(0); showKeyFrame1.Value = -60; showKeyFrame1.EasingFunction = quadraticEase; EasingDoubleKeyFrame showKeyFrame2 = new EasingDoubleKeyFrame(); showKeyFrame2.KeyTime = TimeSpan.FromMilliseconds(85); showKeyFrame2.Value = 0; showKeyFrame2.EasingFunction = quadraticEase; showAnimation.KeyFrames.Add(showKeyFrame1); showAnimation.KeyFrames.Add(showKeyFrame2); Storyboard.SetTargetProperty(showAnimation, new PropertyPath(PlaneProjection.RotationXProperty)); Storyboard.SetTarget(showAnimation, content.Projection); _swivelShow.Children.Add(showAnimation); } } } _swivelShow.Begin(); }); }
void radioListGropus_GroupViewOpened(object sender, GroupViewOpenedEventArgs e) { ItemContainerGenerator itemContainerGenerator = e.ItemsControl.ItemContainerGenerator; TurnstileTransition turnstileTransition = new TurnstileTransition(); turnstileTransition.Mode = TurnstileTransitionMode.ForwardIn; int itemCount = e.ItemsControl.Items.Count; for (int i = 0; i < itemCount; i++) { UIElement element = itemContainerGenerator.ContainerFromIndex(i) as UIElement; ITransition animation = turnstileTransition.GetTransition(element); animation.Begin(); } }
public static void GroupViewOpen(this LongListSelector list, GroupViewOpenedEventArgs e) { //Construct and begin a swivel animation to pop in the group view. IEasingFunction quadraticEase = new QuadraticEase { EasingMode = EasingMode.EaseOut }; Storyboard _swivelShow = new Storyboard(); ItemsControl groupItems = e.ItemsControl; foreach (var item in groupItems.Items) { UIElement container = groupItems.ItemContainerGenerator.ContainerFromItem(item) as UIElement; if (container != null) { Border content = VisualTreeHelper.GetChild(container, 0) as Border; if (content != null) { DoubleAnimationUsingKeyFrames showAnimation = new DoubleAnimationUsingKeyFrames(); EasingDoubleKeyFrame showKeyFrame1 = new EasingDoubleKeyFrame(); showKeyFrame1.KeyTime = TimeSpan.FromMilliseconds(0); showKeyFrame1.Value = -60; showKeyFrame1.EasingFunction = quadraticEase; EasingDoubleKeyFrame showKeyFrame2 = new EasingDoubleKeyFrame(); showKeyFrame2.KeyTime = TimeSpan.FromMilliseconds(85); showKeyFrame2.Value = 0; showKeyFrame2.EasingFunction = quadraticEase; showAnimation.KeyFrames.Add(showKeyFrame1); showAnimation.KeyFrames.Add(showKeyFrame2); Storyboard.SetTargetProperty(showAnimation, new PropertyPath(PlaneProjection.RotationXProperty)); Storyboard.SetTarget(showAnimation, content.Projection); _swivelShow.Children.Add(showAnimation); } } } _swivelShow.Begin(); }
private void categoriesGroup_GroupViewOpened(object sender, GroupViewOpenedEventArgs e) { groupViewOpened = true; }
private void LongListSelector_GroupViewOpened(object sender, GroupViewOpenedEventArgs e) { LongList.GroupViewOpen(e); }
private void countryList_GroupViewOpened(object sender, GroupViewOpenedEventArgs e) { isGroupViewOpened = true; }