public void Dispose() { this.Invalidate(); _owner = null; }
public TrackBar(TrackSlider owner) { _owner = owner; }
private void ImageScrollerValueChanged(object sender, TrackSlider.ValueChangedEventArgs e) { if (e.UserAction == TrackSlider.UserAction.None) { //The change has occurred due to external forces ... so, drawing is up to the external force! _imageScroller.Update(); } else { //we only draw the image box when focused because the user is actually dragging the scrollbar! _imageBox.TopLeftPresentationImageIndex = _imageScroller.Value; // make sure the scrollbar draws immediately! _imageScroller.Update(); // this ordering of draw makes it look smoother for some reason. _imageBox.Draw(); } }