05-07-16, 07:06 PM
(05-07-16, 04:54 PM)الوادي كتب : يا أسامة،جزاك الله خير
جرب هذا التعديل
PHP كود :
private void InvalidateScroll()
{
Debug.Print(Convert.ToString(Height));
if (Convert.ToInt32(Math.Round((decimal)((_Items.Count) * ItemHeight) / _SelectedHeight)) < Convert.ToDouble((((_Items.Count) * ItemHeight) / _SelectedHeight))) {
VerticalScrollbar._Maximum = Convert.ToInt32(Math.Ceiling((decimal)((_Items.Count) * ItemHeight) / _SelectedHeight));
} else if (Convert.ToInt32(Math.Round((decimal)((_Items.Count) * ItemHeight) / _SelectedHeight)) == 0) {
VerticalScrollbar._Maximum = 1;
} else {
VerticalScrollbar._Maximum = Convert.ToInt32(Math.Round((decimal)((_Items.Count) * ItemHeight) / _SelectedHeight));
}
Invalidate();
}


