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)); }
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; }
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; }