# IFlexControl interface

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

```cs
public interface IFlexControl
```

Base interface for Grasshopper UI controls. This interface defined functionality to be added to regular `Control` derived classes.

**Derived types:** [FlexControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol.md)

## Properties

- [AllowPan](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/allowpan.md): Gets whether this control supports mouse panning.
- [AllowZoom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/allowzoom.md): Gets whether this control supports mouse zooming.
- [Border](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/border.md): Gets or sets the border drawn around this control.
- [ContentBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/contentbounds.md): Gets or sets the bounding box of the content. Use an empty rectangle to indicate boundless content.
- [ContentToControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/contenttocontrol.md): Gets the transformation matrix from content coordinates to control coordinates.
- [ControlToContent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/controltocontent.md): Gets the transformation matrix from control coordinates to content coordinates.
- [DrawContentBoundary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/drawcontentboundary.md): Gets or sets whether the content boundary ought to be drawn when visible.
- [DrawEndTime](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/drawendtime.md): Gets the end of the most recent drawing pass. If a drawing is currently in progress, DateTime.Max is returned as it is not yet known when the pass will end.
- [DrawScrollbars](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/drawscrollbars.md): Gets whether this control should display scrollbars when needed. Scrollbars will only be displayed when the content exceeds the inner bounds.
- [DrawStartTime](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/drawstarttime.md): Gets the start of the most recent (and possibly current) drawing pass.
- [FloatingButtons](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/floatingbuttons.md): Gets the floating button collection associated with this control.
- [FocusObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/focusobject.md): Gets the object (if any) which currently has focus within the control.
- [InnerBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/innerbounds.md): Gets the area in control coordinates for the content of the control. This area does not include the control border, nor the scrollbars.
- [InnerScreenBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/innerscreenbounds.md): Gets the inner bounds of this control in screen coordinates.
- [IntegerOrigin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/integerorigin.md): Gets or sets whether this control only allows integer accuracy coordinates for the origin point.
- [IsDragSource](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/isdragsource.md): Gets or sets whether this control is potentially a source for drag+drop operations.
- [IsDropTarget](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/isdroptarget.md): Gets or sets whether this control is potentially a target for drag+drop operations.
- [MaximumZoom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/maximumzoom.md): Gets or sets the maximum allowed zoom.
- [MinimumZoom](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/minimumzoom.md): Gets or sets the minimum allowed zoom.
- [OuterBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/outerbounds.md): Gets the bounds of this control in container coordinates.
- [ParentControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/parentcontrol.md): Gets or sets the parent control.
- [Projection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/projection.md): Gets or sets the projection for this control.
- [ResizeBehaviour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/resizebehaviour.md): Gets or sets the projection behaviour of the content during control resizing events.
- [ResponsivesForwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/responsivesforwards.md): Enumerate over all registered responsive objects.
- [ScreenBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/screenbounds.md): Gets the bounds of this control in screen coordinates.
- [VisibleFrame](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/visibleframe.md): Gets the rectangle in content coordinates which represents the visible portion. This basically means the InnerBounds mapped into content coordinates.
- [ZoomFeedbackLocation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/zoomfeedbacklocation.md): Gets or sets the location for zoom change feedback.

## Methods

- [Animate<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/animate.md): Evaluate an animator. This method automatically schedules redraw events if those are needed for smooth animations.
- [AnimatedZoomFactor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/animatedzoomfactor.md): Gets the normalised factor (0.0, 1.0) which indicates to what extend the display is in the given state.
- [BeginWindowSelect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/beginwindowselect.md): Start a window selection process. This method is typically called from within a MouseDown handler.
- [ComputeWrappingBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/computewrappingbounds.md): Determine the implied wrapping bounds given the control and the screen containing the location. The wrapping bounds are either the bounds of the screen containing the location, or the intersection of the screen containing the location and the bounds of the control if this intersection is not empty.
- [DrawWindowSelectionEdge](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/drawwindowselectionedge.md): (2 overloads) If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
- [DrawWindowSelectionFill](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/drawwindowselectionfill.md): (2 overloads) If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
- [EndWindowSelect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/endwindowselect.md): If, for any reason, you wish to terminate a window selection process prematuraly, call this method. A window selection process will automatically end on the next mouseup.
- [Map](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/map.md): (2 overloads) Map a point from one coordinate system to another.
- [Navigate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/navigate.md): (3 overloads) Navigate to a specific content position.
- [RegisterIResponsive](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/registeriresponsive.md): Add a responsive object to this control. Responsive objects which have been properly registered will automatically have their response methods invoked in case of mouse/keybaord events on the control. The object will not be drawn though, that is the responsibility of the owner.
- [ScheduleRedraw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/scheduleredraw.md): (2 overloads) Schedule a redraw in the near future. Redraw will happen as quickly as possible, though the message queue will be emptied first.
- [UnregisterIResponsive](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/unregisteriresponsive.md): Remove a responsive object from this control.

## Events

- [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/draw.md): This event is raised whenever the control paints itself.
- [PopulateContextMenu](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/populatecontextmenu.md): Raised whenever the context menu ought to be populated.
- [ProjectionChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/projectionchanged.md): Raised whenever the projection of a control changes.
- [WindowSelection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.iflexcontrol/windowselection.md): Raised whenever a window selection completes.
