/// <summary> /// Sets the automatic scroll position. /// </summary> /// <param name="control">The control.</param> /// <param name="value">The value.</param> public static void SetAutoScrollPosition(this ScrollableControl control, Point value) { if (control.InvokeRequired) { control.BeginInvoke(new MethodInvoker(() => control.SetAutoScrollPosition(value))); } else { control.AutoScrollPosition = value; control.Refresh(); } }
/// <summary> /// Sets the minimum size of the automatic scroll. /// </summary> /// <param name="control">The control.</param> /// <param name="value">The value.</param> public static void SetAutoScrollMinSize(this ScrollableControl control, Size value) { if (control.InvokeRequired) { control.BeginInvoke(new MethodInvoker(() => control.SetAutoScrollMinSize(value))); } else { control.AutoScrollMinSize = value; control.Refresh(); } }