# GradientControl class

Namespace: [Grasshopper2.UI.Gradient](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.gradient.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class GradientControl : FlexControl
```

A control for editing gradients.

## Constructors

- [GradientControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/ctor.md): Create a new Gradient control.

## Properties

- [Interaction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/interaction.md): Interaction currently in use.
- [ModifiedGradient](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/modifiedgradient.md): Gets the modified gradient.
- [OriginalGradient](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/originalgradient.md): Gets the original gradient.
- [Parameter0](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/parameter0.md): Gets the parameter along the left edge of the control.
- [Parameter1](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/parameter1.md): Gets the parameter along the right edge of the control.
- [ShowExportButton](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/showexportbutton.md): Gets or sets whether the export to bitmap button is visible.
- [ShowGraphButtons](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/showgraphbuttons.md): Gets or sets whether RGB or Lum graph buttons ought to be visible.
- [SnapToVisibleNumbers](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/snaptovisiblenumbers.md): Gets whether grip drags automatically snap to number-line ticks.

## Methods

- [CreateFloatingButtons](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/createfloatingbuttons.md)
- [SetGradient](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/setgradient.md): Assign a new gradient to this control.

## Events

- [GradientChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/gradientchanged.md): Raised whenever the gradient changes.
- [ViewChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.gradient.gradientcontrol/viewchanged.md)

## Inherited Members

- From [FlexControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol.md): [AllowPan](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/allowpan.md), [AllowScrollGesture](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/allowscrollgesture.md), [AllowZoom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/allowzoom.md), [AutoWindowSelect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/autowindowselect.md), [Border](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/border.md), [ContentBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/contentbounds.md), [ContentToControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/contenttocontrol.md), [ControlToContent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/controltocontent.md), [CurrentWindowSelection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/currentwindowselection.md), [DrawContentBoundary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/drawcontentboundary.md), [DrawScrollbars](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/drawscrollbars.md), [FloatingButtonRail](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/floatingbuttonrail.md), [FloatingButtons](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/floatingbuttons.md), [FocusObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/focusobject.md), [InnerBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/innerbounds.md), [InnerScreenBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/innerscreenbounds.md), [IntegerOrigin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/integerorigin.md), [IsDragSource](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/isdragsource.md), [IsDropTarget](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/isdroptarget.md), [MaximumZoom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/maximumzoom.md), [MinimumZoom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/minimumzoom.md), [MouseDwellDelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/mousedwelldelay.md), [OuterBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/outerbounds.md), [ParentControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/parentcontrol.md), [Projection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/projection.md), [ResizeBehaviour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/resizebehaviour.md), [ResponsivesBackwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/responsivesbackwards.md), [ResponsivesForwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/responsivesforwards.md), [ScreenBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/screenbounds.md), [VisibleFrame](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/visibleframe.md), [ZoomFeedbackLocation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/zoomfeedbacklocation.md), [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/draw.md), [MouseDwell](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/mousedwell.md), [PopulateContextMenu](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/populatecontextmenu.md), [ProjectionChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/projectionchanged.md), [WindowSelection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/windowselection.md), [AddSparkle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/addsparkle.md), [Animate<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/animate.md), [AnimatedZoomFactor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/animatedzoomfactor.md), [BeginWindowSelect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/beginwindowselect.md), [ComputeWrappingBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/computewrappingbounds.md), [DispatchRotation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/dispatchrotation.md), [DrawWindowSelectionEdge](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/drawwindowselectionedge.md), [DrawWindowSelectionFill](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/drawwindowselectionfill.md), [EndWindowSelect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/endwindowselect.md), [FloatingButtonTooltipOverride](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/floatingbuttontooltipoverride.md), [LooksLikeSingleClick](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/lookslikesingleclick.md), [Map](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/map.md), [Navigate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/navigate.md), [OnKeyDown](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onkeydown.md), [OnKeyUp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onkeyup.md), [OnLoad](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onload.md), [OnLoadComplete](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onloadcomplete.md), [OnMouseDoubleClick](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onmousedoubleclick.md), [OnMouseDown](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onmousedown.md), [OnMouseLeave](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onmouseleave.md), [OnMouseMove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onmousemove.md), [OnMouseUp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onmouseup.md), [OnMouseWheel](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onmousewheel.md), [OnPaint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onpaint.md), [OnPinchGesture](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onpinchgesture.md), [OnPopulateContextMenu](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onpopulatecontextmenu.md), [OnScrollGesture](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onscrollgesture.md), [OnSizeChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/onsizechanged.md), [OnTextInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/ontextinput.md), [PopFocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/popfocus.md), [PushFocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/pushfocus.md), [RegisterIResponsive](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/registeriresponsive.md), [ScheduleRedraw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/scheduleredraw.md), [UnregisterIResponsive](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/unregisteriresponsive.md), [UpdateMapping](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/updatemapping.md)
