Table of Contents

Interface IControlHandler

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

Contains methods and properties which allow to work with control.

public interface IControlHandler : IDisposableObject, IDisposable

Properties

Activated

Gets or sets an action which is called when 'Activated' event is raised.

AllowDrop

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

BackgroundColor

Gets or sets the background color for the control.

BackgroundStyle

Gets or sets the background style of the control.

BindScrollEvents

Gets or sets whether scroll events are binded and recveived in the control.

BorderStyle

Gets or sets border style of the control.

Bounds

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

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 Control's client area, in device-independent units.

Control

Gets a Control this handler provides the implementation for.

Deactivated

Gets or sets an action which is called when 'Deactivated' event is raised.

DpiChanged

Gets or sets an action which is called when 'DpiChanged' event is raised.

DragDrop

Gets or sets an action which is called when 'DragDrop' event is raised.

DragEnter

Gets or sets an action which is called when 'DragEnter' event is raised.

DragLeave

Gets or sets an action which is called when 'DragLeave' event is raised.

DragOver

Gets or sets an action which is called when 'DragOver' event is raised.

EventBounds

Gets native control bounds. Valid only in the event handler.

EventNewDpi

Gets new dpi. Available only in the DpiChanged event handler.

EventOldDpi

Gets old dpi. Available only in the DpiChanged event handler.

Font

Gets or sets the font of the text displayed by the control.

ForegroundColor

Gets or sets the foreground color for the control.

GotFocus

Gets or sets an action which is called when 'GotFocus' event is raised.

HandleCreated

Gets or sets an action which is called when 'HandleCreated' event is raised.

HandleDestroyed

Gets or sets an action which is called when 'HandleDestroyed' event is raised.

HorizontalScrollBarValueChanged

Gets or sets an action which is called when 'HorizontalScrollBarValueChanged' event is raised.

HorzScrollBarInfo

Gets or sets horizontal scrollbar position as ScrollBarInfo.

Idle

Gets or sets an action which is called when 'Idle' event is raised.

IntrinsicLayoutPadding

Gets intrinsic layout padding of the native control.

IntrinsicPreferredSizePadding

Gets intrinsic preferred size padding of the native control.

IsAttached

Gets a value indicating whether handler is attached to a Control.

IsBold

Gets or sets whether control's font is bold.

IsFocused

Gets a value indicating whether the control has input focus.

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.

IsNativeControlCreated

Gets whether or not native control is created.

IsScrollable

Gets or sets whether controls is scrollable.

LangDirection

Gets or sets the language direction for this control.

LocationChanged

Gets or sets an action which is called when 'LocationChanged' event is raised.

LostFocus

Gets or sets an action which is called when 'LostFocus' event is raised.

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.

MouseCaptureLost

Gets or sets an action which is called when 'MouseCaptureLost' event is raised.

MouseClick

Gets or sets an action which is called when 'MouseClick' event is raised.

MouseEnter

Gets or sets an action which is called when 'MouseEnter' event is raised.

MouseLeave

Gets or sets an action which is called when 'MouseLeave' event is raised.

Paint

Gets or sets an action which is called when 'Paint' event is raised.

ProcessIdle

Gets or sets whether Idle event is fired.

ProcessUIUpdates
SizeChanged

Gets or sets an action which is called when 'SizeChanged' event is raised.

SystemColorsChanged

Gets or sets an action which is called when 'SystemColorsChanged' event is raised.

TabStop

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

Text

Gets or sets the text associated with this control.

TextChanged

Gets or sets an action which is called when 'TextChanged' event is raised.

UserPaint

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

VertScrollBarInfo

Gets or sets vertical scrollbar position as ScrollBarInfo.

VerticalScrollBarValueChanged

Gets or sets an action which is called when 'VerticalScrollBarValueChanged' event is raised.

Visible

Gets or sets a value indicating whether the control and all its child controls are displayed.

VisibleChanged

Gets or sets an action which is called when 'VisibleChanged' event is raised.

WantChars

Gets or sets whether control wants to get all char/key events for all keys.

Methods

Attach(Control)

Attaches this handler to the specified Control.

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.

CenterOnParent(GenericOrientation)

Centers the window.

ClientToScreen(PointD)

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

CreateDrawingContext()

Creates the Graphics for the control.

Detach()

Detaches this handler from the Control it is attached to.

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.

FocusNextControl(bool, bool)

Focuses the next control.

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. You should not use this property.

GetNativeControl()

Gets native control.

GetPixelScaleFactor()

Gets scale factor.

GetPreferredSize(SizeD)

Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.

GetScrollBarEvtKind()

Gets scrollbar event type. Available only in the event handler.

GetScrollBarEvtPosition()

Gets scrollbar position. Available only in the event handler.

GetUpdateClientRectI()

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

HandleNeeded()

Creates native control if its not already created.

Invalidate()

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

IsTransparentBackgroundSupported()

Checks whether using transparent background might work.

Lower()

Lowers the window to the bottom of the window hierarchy (Z-order). This function only works for top level windows.

OnChildInserted(Control)

Called when a Control is inserted into the Children.

OnChildRemoved(Control)

Called when a Control is removed from the Children collections.

OnLayoutChanged()

This methods is called when the layout of the control changes.

OpenPaintDrawingContext()

Opens drawing context. Available only in the event handler.

Raise()

Raises the window to the top of the window hierarchy (Z-order). This function only works for top level windows.

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.

ResetBackgroundColor()

Resets background color.

ResetForegroundColor()

Resets foreground color.

SaveScreenshot(string)

Saves screenshot of this control.

ScreenToClient(PointD)

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

SetCursor(Cursor?)

Changes Cursor property.

SetEnabled(bool)

Same as Enabled but implemented as method.

SetFocus()

Sets input focus to the control.

SetFocusFlags(bool, bool, bool)

Sets focus related flags.

SetToolTip(string?)

Sets tooltip text.

UnsetToolTip()

Clears toltip text.

Update()

Causes the control to redraw the invalidated regions.