public static ColorBlend GetGradient(ColorBlend originalBlend) { using (var form = new GradientDialog()) { form.SetColorBlend(originalBlend); if (form.ShowDialog() == DialogResult.OK) { return form.GetColorBlend(); } } return null; }
public static ColorBlend GetGradient(ColorBlend originalBlend) { using (GradientDialog gradientDialog = new GradientDialog()) { gradientDialog.SetColorBlend(originalBlend); if (gradientDialog.ShowDialog() == DialogResult.OK) { return(gradientDialog.GetColorBlend()); } } return(null); }