Click or drag to resize

Control Class

Base for all visual UI elements
Inheritance Hierarchy

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.4.0
Syntax
public class Control : BindableWidget, IMouseInputSource, 
	IKeyboardInputSource, ICallbackSource

The Control type exposes the following members.

Constructors
  NameDescription
Protected methodControl
Initializes a new instance of the Control class.
Public methodControl(ControlIHandler)
Initializes a new instance of the Container with the specified handler
Top
Properties
  NameDescription
Public propertyAllowDrop
Gets or sets a value indicating whether this control can serve as drop target.
Public propertyBackgroundColor
Gets or sets the color for the background of the control
Public propertyBounds
Gets the bounding rectangle of this control relative to its container
Public propertyCursor
Gets or sets the type of cursor to use when the mouse is hovering over the control
Public propertyEnabled
Gets or sets a value indicating whether this Control is enabled and accepts user input.
Public propertyHasFocus
Gets a value indicating whether this instance has the keyboard input focus.
Public propertyHeight
Gets or sets the height of the control size.
Public propertyIsSuspended
Gets a value indicating whether the layout of child controls is suspended.
Public propertyIsVisualControl
Gets a value indicating this Control is part of the visual tree.
Public propertyLoaded
Gets a value indicating that the control is loaded onto a form, that is it has been created, added to a parent, and shown
Public propertyLocation
Gets the location of the control as positioned by the container
Public propertyLogicalParent
Gets the logical parent control.
Public propertyParent
Gets the container which this control has been added to, if any
Public propertyParentWindow
Gets the window this control is contained in
Public propertySize
Gets or sets the size of the control. Use -1 to specify auto sizing for either the width and/or height.
Public propertySupportedPlatformCommands
Gets the supported platform commands that can be used to hook up system functions to user defined logic
Public propertyTabIndex
Gets or sets the tab index order for this control within its container.
Public propertyTag
Gets or sets a user-defined object that contains data about the control
Public propertyToolTip
Gets or sets the tool tip to show when the mouse is hovered over the control
Public propertyVisible
Gets or sets a value indicating whether this Control is visible to the user.
Public propertyVisualControls
Gets an enumeration of controls that are in the visual tree.
Public propertyVisualParent
Gets the visual container of this control, if any.
Public propertyWidth
Gets or sets the width of the control size.
Top
Methods
  NameDescription
Public methodAttachNative
Attaches the control for direct use in a native application
Public methodDetach
Detaches the control by removing it from its parent
Public methodDetachNative
Detaches the control when it is used in a native application, when you want to reuse the control.
Protected methodDispose
Handles the disposal of this control
(Overrides WidgetDispose(Boolean).)
Public methodDoDragDrop
Starts drag operation using this control as drag source.
Public methodFindParent(String)
Finds a control in the parent hierarchy with the specified id
Public methodFindParent(Type, String)
Finds a control in the parent hierarchy with the specified type and ID if specified
Public methodFocus
Attempts to set the keyboard input focus to this control, or the first child that accepts focus
Protected methodGetCallback
Gets an instance of an object used to perform callbacks to the widget from handler implementations
(Overrides WidgetGetCallback.)
Public methodInvalidate
Queues a repaint of the entire control on the screen and any of its children.
Public methodInvalidate(Boolean)
Queues a repaint of the entire control on the screen
Public methodInvalidate(Rectangle)
Queues a repaint of the specified rect of the control and any children.
Public methodInvalidate(Rectangle, Boolean)
Queues a repaint of the specified rect of the control
Public methodCode exampleMapPlatformCommand
Specifies a command to execute for a platform-specific command
Protected methodOnDragDrop
Raises the DragDrop event.
Protected methodOnDragEnter
Raises the DragEnter event.
Protected methodOnDragLeave
Raises the DragLeave event.
Protected methodOnDragOver
Raises the DragOver event.
Protected methodOnEnabledChanged
Raises the EnabledChanged event.
Protected methodOnGotFocus
Raises the GotFocus event.
Protected methodOnKeyDown
Raises the KeyDown event.
Protected methodOnKeyUp
Raises the KeyUp event.
Protected methodOnLoad
Raises the Load event.
Protected methodOnLoadComplete
Raises the LoadComplete event.
Protected methodOnLostFocus
Raises the LostFocus event.
Protected methodOnMouseDoubleClick
Raises the mouse MouseDoubleClick event.
Protected methodOnMouseDown
Raises the MouseDown event.
Protected methodOnMouseEnter
Raises the MouseEnter event.
Protected methodOnMouseLeave
Raises the MouseLeave event.
Protected methodOnMouseMove
Raises the MouseMove event.
Protected methodOnMouseUp
Raises the MouseUp event.
Protected methodOnMouseWheel
Raises the MouseWheel event.
Protected methodOnPreLoad
Raises the PreLoad event.
Protected methodOnShown
Raises the Shown event.
Protected methodOnSizeChanged
Raises the SizeChanged event.
Protected methodOnTextInput
Raises the TextInput event.
Protected methodOnUnLoad
Raises the UnLoad event.
Public methodPointFromScreen
Converts a point from screen space to control space.
Public methodPointToScreen
Converts a point from control space to screen space
Public methodRectangleFromScreen
Converts a rectangle from control space to screen space
Public methodRectangleToScreen
Converts a rectangle from screen space to control space.
Public methodResumeLayout
Resumes the layout after it has been suspended, and performs a layout
Public methodSuspendLayout
Suspends the layout of child controls
Top
Events
  NameDescription
Public eventDragDrop
Occurs when a drag operation is dropped onto the control.
Public eventDragEnter
Occurs when a drag operation enters the bounds of the control.
Public eventDragLeave
Occurs when a drag operation leaves the bounds of the control or the drag operation was completed inside the control.
Public eventDragOver
Occurs when a drag operation is over the control and needs updating based on position or keyboard state changes.
Public eventEnabledChanged
Occurs when the Enabled value is changed.
Public eventGotFocus
Occurs when the control receives keyboard focus.
Public eventKeyDown
Occurs when a key has been pressed and is down
Public eventKeyUp
Occurs when a key was released
Public eventLoad
Occurs when the control is displayed on a visible window
Public eventLoadComplete
Occurs when the load is complete, which happens after the Load event
Public eventLostFocus
Occurs when control loses keyboard focus
Public eventMouseDoubleClick
Occurs when a mouse button is double clicked within the bounds of the control
Public eventMouseDown
Occurs when a mouse button has been pressed
Public eventMouseEnter
Occurs when the mouse enters the bounds of the control
Public eventMouseLeave
Occurs when mouse leaves the bounds of the control
Public eventMouseMove
Occurs when mouse moves within the bounds of the control, or when the mouse is captured
Public eventMouseUp
Occurs when a mouse button is released
Public eventMouseWheel
Occurs when mouse wheel has been changed
Public eventPreLoad
Occurs before the control is loaded. See the Load event for more detail.
Public eventShown
Occurs when the control is shown on the screen
Public eventSizeChanged
Occurs when the size of the control is changed.
Public eventTextInput
Occurs when text is input for the control. Currently only partially supported on iOS.
Public eventUnLoad
Occurs when the control is unloaded, which happens when removed from the control hierarchy or the window is closed.
Top
Operators
Fields
  NameDescription
Public fieldStatic memberDragDropEvent
Event identifier for handlers when attaching the DragDrop event
Public fieldStatic memberDragEnterEvent
Event identifier for handlers when attaching the DragEnter event
Public fieldStatic memberDragLeaveEvent
Event identifier for handlers when attaching the DragLeave event
Public fieldStatic memberDragOverEvent
Event identifier for handlers when attaching the DragOver event
Public fieldStatic memberGotFocusEvent
Event identifier for handlers when attaching the GotFocus event
Public fieldStatic memberKeyDownEvent
Event identifier for handlers when attaching the KeyDown event.
Public fieldStatic memberKeyUpEvent
Event identifier for handlers when attaching the KeyUp event
Public fieldStatic memberLostFocusEvent
Event identifier for handlers when attaching the LostFocus event
Public fieldStatic memberMouseDoubleClickEvent
Event identifier for handlers when attaching the MouseDoubleClick event
Public fieldStatic memberMouseDownEvent
Event identifier for handlers when attaching the MouseDown event
Public fieldStatic memberMouseEnterEvent
Event identifier for handlers when attaching the MouseEnter event
Public fieldStatic memberMouseLeaveEvent
Event identifier for handlers when attaching the MouseLeave event
Public fieldStatic memberMouseMoveEvent
Event identifier for handlers when attaching the MouseMove event
Public fieldStatic memberMouseUpEvent
Event identifier for handlers when attaching the MouseUp event
Public fieldStatic memberMouseWheelEvent
Event identifier for handlers when attaching the MouseWheel event
Public fieldStatic memberShownEvent
Event identifier for handlers when attaching the Shown event
Public fieldStatic memberSizeChangedEvent
Event identifier for handlers when attaching the SizeChanged event
Public fieldStatic memberTextInputEvent
Event identifier for handlers when attaching the TextInput event
Top
Remarks
All visual user interface elements should inherit from this class to provide common functionality like binding, load/unload, and common events.
See Also
Inheritance Hierarchy
SystemObject
  EtoWidget
    Eto.FormsBindableWidget
      Eto.FormsControl
        Eto.FormsCalendar
        Eto.FormsColorPicker
        Eto.FormsCommonControl
        Eto.FormsContainer
        Eto.FormsFilePicker
        Eto.FormsFontPicker
        Eto.FormsGrid
        Eto.FormsImageView
        Eto.FormsProgressBar
        Eto.FormsSlider
        Eto.FormsSpinner
        Eto.FormsStepper
        Eto.FormsTreeView
        Eto.FormsWebView