private void BtOffset__PointerExited(object sender, PointerRoutedEventArgs e) { var stack = (StackPanel)((Button)sender).Content; UtilityClass.moveXOffset(stack.Children[0], 0); UtilityClass.moveXOffset(stack.Children[1], 0); }
private void stackOffSet_PointerExited(object sender, PointerRoutedEventArgs e) { try { var stackPanel = (Grid)sender; var stackChild = stackPanel.Children; UtilityClass.moveXOffset(stackChild[0], 0); UtilityClass.moveXOffset(stackChild[1], 0); } catch (Exception) { } }
private void OffsetAnimation_PointerExited(object sender, PointerRoutedEventArgs e) { try { UIElementCollection stackChild = null; var item = (ListViewItem)sender; if (item.Content is Grid) { var stackPanel = (Grid)item.Content; stackChild = stackPanel.Children; } else { var stackPanel = (StackPanel)item.Content; stackChild = stackPanel.Children; } UtilityClass.moveXOffset(stackChild[0], 0); UtilityClass.moveXOffset(stackChild[1], 0); } catch (Exception) { } }