/// <summary> /// Sets the anchor. /// </summary> /// <param name="control">The control.</param> /// <param name="value">The value.</param> public static void SetAnchor(this ToolStrip control, AnchorStyles value) { if (control.InvokeRequired) { control.BeginInvoke(new MethodInvoker(() => control.SetAnchor(value))); } else { control.Anchor = value; control.Refresh(); } }