예제 #1
0
 private void MoveToNextOrPrevious(bool next)
 {
     if (next)
     {
         SwipeThroughControl.Swap(this._elements, 0, 1);
         SwipeThroughControl.Swap(this._elements, 1, 2);
     }
     else
     {
         SwipeThroughControl.Swap(this._elements, 1, 2);
         SwipeThroughControl.Swap(this._elements, 0, 1);
     }
     this.UpdateSources(false, new bool?(next));
 }
예제 #2
0
        private static void OnBackgroundBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SwipeThroughControl swipeThroughControl = d as SwipeThroughControl;

            if (swipeThroughControl == null)
            {
                return;
            }
            Brush brush = e.NewValue as Brush;

            if (brush == null)
            {
                return;
            }
            swipeThroughControl.gridRoot.Background = brush;
        }
예제 #3
0
        private static void OnBackgroundBrushChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SwipeThroughControl swipeThroughControl = d as SwipeThroughControl;

            if (swipeThroughControl == null)
            {
                return;
            }
            // ISSUE: explicit reference operation
            Brush newValue = e.NewValue as Brush;

            if (newValue == null)
            {
                return;
            }
            ((Panel)swipeThroughControl.gridRoot).Background = newValue;
        }