void Control_Scroll(object sender, AbsListView.ScrollEventArgs e) { int y = (int)(-e.View.GetChildAt(0).GetY() / 2); if (y == lastY) { return; } if (e.FirstVisibleItem == 0 && y <= 255 && y >= 0) { CustomNavigationPage.SetBarBackgroundColor(Color.FromRgba(255, 80, 80, lastY = y)); } else if (e.FirstVisibleItem != 0 && Math.Abs(lastY - 1) > double.Epsilon) { CustomNavigationPage.SetBarBackgroundColor(Color.FromRgba(255, 80, 80, lastY = 255)); } }