Table of Contents

Class Control

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Control handled by the operating system.

public class Control : AbstractControl, IBaseObjectWithId, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo
Inheritance
Control
Implements
Derived

Constructors

Control()

Initializes a new instance of the AbstractControl class.

Control(Control)

Initializes a new instance of the AbstractControl class.

Fields

Empty

Gets an empty control for use in the different places. Do not change any properties of this control.

Properties

AllowDrop

Gets or sets a value indicating whether the control can accept data that the user drags onto it.

BackgroundStyle

Gets or sets the background style of the control.

BorderStyle

Gets or sets border style of the control.

Bounds

Gets or sets the AbstractControl bounds relative to the parent, in device-independent units.

BoundsInPixels

Gets or sets bounds in pixels. You should not normally use this property unless this control is a top level window.

CanSelect

Gets or sets value indicating whether this control accepts input or not (i.e. behaves like a static text) and so doesn't need focus.

ClientSize

Gets or sets size of the AbstractControl's client area, in device-independent units.

Cursor

Gets or sets the cursor that the control should normally display.

Focused

Gets a value indicating whether the control has input focus.

Handler

Gets a IControlHandler associated with this class.

HasBorder

Gets or sets a value indicating whether the control has a border.

IntrinsicLayoutPadding

Gets intrinsic layout padding of the native control.

IntrinsicPreferredSizePadding

Gets intrinsic preferred size padding of the native control.

IsGraphicControl

Gets whether control is graphic control. Graphic controls can not be selected using mouse, do not accept focus and ignore keyboard.

IsHandleCreated

Gets a value indicating whether the control has a native window handle associated with it.

IsMouseCaptured

Gets a value indicating whether the mouse is captured to this control.

IsPlatformControl

Gets whether this is control has handler to the platform control.

IsScrollable

Gets or sets whether controls is scrollable. This makes sense only for UserControl descendants.

LangDirection

Gets or sets the language direction for this control.

MaximumSize

Gets or sets the maximum size the window can be resized to.

MinimumSize

Gets or sets the minimum size the window can be resized to.

NativeControl

Gets native control instance.

ProcessIdle

Gets or sets whether Idle event is fired.

RealBackgroundColor

Gets real background color for the control.

RealForegroundColor

Gets real foreground color for the control.

SafeHandler

Gets a IControlHandler associated with this class or Null if control is disposed.

Text

Gets or sets the text associated with this control.

UserPaint

Gets or set a value indicating whether the control paints itself rather than the operating system doing so.

VisibleOnScreen

Gets whether control is visible on screen.

Methods

BeginInit()

Starts the initialization process for this control.

BeginUpdate()

Maintains performance while performing slow operations on a control by preventing the control from drawing until the EndUpdate() method is called.

CaptureMouse()

Captures the mouse to the control.

ClientToScreen(PointD)

Converts the client-area coordinates of a specified point to screen coordinates.

CreateDrawingContext()

Creates the Graphics for the control.

CreateHandler()

Creates a handler for the control.

DetachHandler()

Disconnects the current control Handler from the control. This method calls Detach().

DisposeManaged()

Override to dispose managed resources. Here we dispose all used object references.

DoDragDrop(object, DragDropEffects)

Begins a drag-and-drop operation.

EndInit()

Ends the initialization process for this control.

EndUpdate()

Resumes painting the control after painting is suspended by the BeginUpdate() method.

EnsureHandlerCreated()

Ensures that the control Handler is created, creating and attaching it if necessary.

GetBestSizeWithoutPadding(SizeD)

Gets size of the native control without padding.

GetDefaultAttributesBgColor()

Gets background color from the default attributes.

GetDefaultAttributesFgColor()

Gets foreground color from the default attributes.

GetDefaultAttributesFont()

Gets font from the default attributes.

GetHandle()

Gets native handler of the control. For Windows this is hWnd, for other operating systems currently returns null. You should not use this property.

GetScrollBarInfo(bool)

Gets vertical or horizontal scrollbar position as ScrollBarInfo.

GetUpdateClientRect()

Gets the update rectangle region bounding box in client coordinates. This method can be used in paint events. Returns rectangle in device-independent units.

GetUpdateClientRectI()

Gets the update rectangle region bounding box in client coordinates. This method can be used in paint events. Returns rectangle in pixels.

HandleNeeded()

Creates native control if its not already created.

HideToolTip()

Hides tooltip if it is visible. This method doesn't change ToolTip property.

InternalSetColor(bool, Color?)

Sets internal color.

Invalidate()

Invalidates the control and causes a paint message to be sent to the control.

InvalidateBestSize()

Resets the cached best size value so it will be recalculated the next time it is needed.

IsTransparentBackgroundSupported()

Checks whether using transparent background might work.

OnFontChanged(EventArgs)

Called when the value of the Font property changes.

OnTextChanged(EventArgs)

Called when the TextChanged event is raised.

OnToolTipChanged(EventArgs)

Raises the ToolTipChanged event.

RaiseBackgroundColorChanged()

Called after background color changed.

RaiseChildInserted(int, AbstractControl)

Raises the ChildInserted event and OnChildInserted(int, AbstractControl) method.

RaiseChildRemoved(AbstractControl)

Raises the ChildRemoved event and OnChildRemoved(AbstractControl) method.

RaiseEnabledChanged(EventArgs)

Raises the EnabledChanged event and calls OnEnabledChanged(EventArgs).

RaiseHandleCreated(EventArgs)

Raises the HandleCreated event and OnHandleCreated(EventArgs) method.

RaiseHandlerTextChanged(string)

Called when handler's text property is changed.

RaiseVisibleChanged(EventArgs)

Raises VisibleChanged event and OnVisibleChanged(EventArgs) method.

RecreateHandler()

Forces the re-creation of the handler for the control.

RecreateWindow()

Forces the re-creation of the underlying native control.

RefreshRect(RectD, bool)

Same as Invalidate(RectD) but has additional parameter eraseBackground.

ReleaseMouseCapture()

Releases the mouse capture, if the control held the capture.

RequestScaleFactor()

Requests scale factor from the parent or other available sources.

RequireHandler(AbstractControl?)

Gets IControlHandler for the control if it is possible.

ResumeHandlerTextChange()

Resumes live binding between native control's Text and control's Text.

ScreenToClient(PointD)

Converts the screen coordinates of a specified point on the screen to client-area coordinates.

SetFocus()

Sets input focus to the control.

SetScrollBarInfo(bool, ScrollBarInfo)

Sets vertical or horizontal scrollbar position as ScrollBarInfo.

SuspendHandlerTextChange()

Suspends live binding between native control's Text and control's Text.

Update()

Causes the control to redraw the invalidated regions.

UpdateFocusFlags(bool, bool)

Updates focus related flags.