Interface IControl
Provides access to the methods and properties of the control.
public interface IControl : IDisposable, IWin32Window
Properties
- AllowDrop
Gets or sets a value indicating whether the control can accept data that the user drags onto it.
- BackColor
Gets or sets the background color for the control.
- Background
Gets or sets the background brush for the control.
- BackgroundColor
Gets or sets the background color for the control.
- BackgroundImage
Gets or sets the background image displayed in the control.
- BackgroundImages
Gets or sets background images attached to this control.
- BackgroundStyle
Gets or sets the background style of the control.
- Backgrounds
Gets or sets background brushes attached to this control.
- Borders
Gets border for all states of the control.
- Bottom
Gets the distance, in dips, between the bottom edge of the control and the top edge of its container's client area.
- CanFocus
Gets a value indicating whether the control can receive focus.
- CanUserPaint
Gets whether user paint is supported for this control.
- ChildCount
Gets number of children items.
- ChildrenLayoutBounds
Gets a rectangle which describes an area inside of the Control available for positioning (layout) of its child controls, in device-independent units.
- ClientRectangle
Gets a rectangle which describes the client area inside of the Control, in device-independent units.
- ClientSize
Gets or sets size of the Control's client area, in device-independent units.
- ColumnIndex
Gets or sets column index which is used by the Grid control.
- ColumnSpan
Gets or sets a value that indicates the total number of columns this control's content spans within a container.
- ContainsFocus
Gets a value indicating whether the control, or one of its child controls, currently has the input focus.
- ControlKind
Returns control identifier.
- Cursor
Gets or sets the cursor that the control should normally display.
- CustomAttr
Gets custom attributes provider associated with the control. You can store any custom data here.
- CustomFlags
Gets custom flags provider associated with the control. You can store any custom data here.
- Dock
Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.
- DrawClientRectangle
Returns rectangle in which custom drawing need to be performed. Useful for custom draw controls
- Enabled
Gets or sets a value indicating whether the control can respond to user interaction.
- FileSystem
Gets or sets IFileSystem which is used in the control. If this property is
null
(default), Default is used as file system provider.
- FlagsAndAttributes
Gets custom flags and attributes provider associated with the control. You can store any custom data here.
- Focused
Gets a value indicating whether the control has input focus.
- Font
Gets or sets the font of the text displayed by the control.
- ForeColor
Gets or sets the foreground color for the control.
- Foreground
Gets or sets the foreground brush for the control.
- ForegroundColor
Gets or sets the foreground color for the control.
- Foregrounds
Gets or sets foreground brushes attached to this control.
- GroupIndex
Gets or sets group indexes of this control.
- GroupIndexes
Gets or sets group indexes which are assigned to this control.
- HasChildren
Gets whether there are any childrent in the control.
- Height
Gets or sets the height of the control.
- HorizontalAlignment
Gets or sets the horizontal alignment applied to this control when it is positioned within a parent control.
- HorzScrollBarInfo
Gets or sets horizontal scrollbar position as ScrollBarInfo.
- IgnoreLayout
Gets or sets whether layout rules are ignored for this control.
- ImeMode
Gets or sets the Input Method Editor (IME) mode of the control.
- InUpdates
Getw whether control is performing updates.
- IndexInParent
Gets control index in the children collection of the container control.
- InputTransparent
Gets or sets whether mouse events are bubbled to parent control.
- IntrinsicLayoutPadding
Gets intrinsic layout padding of the native control.
- IntrinsicPreferredSizePadding
Gets intrinsic preferred size padding of the native control.
- IsBold
Gets or sets whether control's font is bold.
- IsDarkBackground
Returns true if control's background color is darker than foreground color.
- IsHandleCreated
Gets a value indicating whether the control has a native window handle associated with it.
- IsLayoutPerform
Gets whether layout is currently performed.
- IsLayoutSuspended
Gets whether layout is suspended.
- IsMouseCaptured
Gets a value indicating whether the mouse is captured to this control.
- IsMouseLeftButtonDown
Gets whether left mouse button is over control and is down.
- IsMouseOver
Gets a value indicating whether the mouse pointer is over the Control.
- IsScrollable
Gets or sets whether controls is scrollable.
- LangDirection
Gets or sets the language direction for this control.
- LastDoubleClickTimestamp
Gets last time when mouse double click was done.
- Layout
Gets or sets layout style of the child controls.
- LayoutData
Gets or sets cached data for the layout engine.
- LayoutProps
Gets or sets additional properties which are layout specific.
- Left
Gets or sets the distance between the left edge of the control and the left edge of its container's client area.
- Location
Gets or sets the location of upper-left corner of the control, in device-independent units.
- Margin
Gets or sets the outer margin of a control.
- MaxHeight
Gets or sets the maximum height the window can be resized to.
- MaxWidth
Gets or sets the maximum width the window can be resized to.
- MaximumSize
Gets or sets the maximum size the window can be resized to.
- MeasureCanvas
Gets Graphics which can be used to measure text size and for other measure purposes.
- MinChildMargin
Gets or sets minimal value of the child's Margin property.
- MinHeight
Gets or sets the minimum height the window can be resized to.
- MinWidth
Gets or sets the minimum width the window can be resized to.
- MinimumSize
Gets or sets the minimum size the window can be resized to.
- NativeControl
Gets native control instance.
- NextSibling
Gets next visible sibling control.
- Padding
Gets or sets the padding inside a control.
- Parent
Gets or sets the parent container of the control.
- ParentBackColor
Gets or sets whether BackgroundColor is automatically updated when parent's BackgroundColor is changed.
- ParentFont
Gets or sets whether Font is automatically updated when parent's Font is changed.
- ParentForeColor
Gets or sets whether ForegroundColor is automatically updated when parent's ForegroundColor is changed.
- ParentWindow
Gets the parent window of the control).
- ProcessIdle
Gets or sets whether Idle event is fired.
- RealBackgroundColor
Gets real background color for the control.
- RealFont
Gets real font value.
- RealForegroundColor
Gets real foreground color for the control.
- Right
Gets the distance, in dips, between the right edge of the control and the left edge of its container's client area.
- RowSpan
Gets or sets a value that indicates the total number of rows this control's content spans within a container.
- ScaleFactor
Gets scale factor used in device-independent units to/from pixels conversions.
- Site
Gets or sets the site of the control.
- Size
Gets or sets the size of the control.
- StateFlags
Gets control flags.
- StateObjects
Gets or sets data (images, colors, borders, pens, brushes, etc.) for different control states.
- SuggestedHeight
Gets or sets the suggested height of the control.
- SuggestedSize
Gets or sets the suggested size of the control.
- SuggestedWidth
Gets or sets the suggested width of the control.
- TabStop
Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.
- Tag
Gets or sets the object that contains data about the control.
- Text
Gets or sets the text associated with this control.
- Title
Gets or sets the title of the control.
- ToolTip
Gets or sets the tool-tip that is displayed for this element in the user interface.
- Top
Gets or sets the distance between the top edge of the control and the top edge of its container's client area.
- UniqueId
Gets unique id of this control.
- 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.
- VerticalAlignment
Gets or sets the vertical alignment applied to this control when it is positioned within a parent control.
- Visible
Gets or sets a value indicating whether the control and all its child controls are displayed.
- VisualState
Gets current VisualControlState.
- VisualStateOverride
Gets or sets override value for the VisualState property.
- Width
Gets or sets the width of the control.
Methods
- AvoidException(Action)
Executes Action and calls ProcessException event if exception was raised during execution.
- BeginInit()
Starts the initialization process for this control.
- BeginInvoke(Action)
Executes an action asynchronously on the thread that the control was created on.
- BeginInvoke(Delegate)
Executes a delegate asynchronously on the thread that the control was created on.
- BeginInvoke(Delegate, object?[])
Executes a delegate asynchronously on the thread that the control was created on.
- BeginUpdate()
Maintains performance while performing slow operations on a control by preventing the control from drawing until the EndUpdate() method is called.
- BringToFront()
Brings the control to the front of the z-order.
- 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.
- CreateGraphics()
Same as CreateDrawingContext(). Added mainly for legacy code.
- DoDragDrop(object, DragDropEffects)
Begins a drag-and-drop operation.
- DoInsideLayout(Action)
Executes
action
between calls to SuspendLayout() and ResumeLayout(bool).
- DoInsideUpdate(Action)
Executes
action
between calls to BeginUpdate() and EndUpdate().
- EndInit()
Ends the initialization process for this control.
- EndInvoke(IAsyncResult)
Gets result of the BeginInvoke(Action) call.
- EndUpdate()
Resumes painting the control after painting is suspended by the BeginUpdate() method.
- Focus()
Sets input focus to the control.
- FocusNextControl(bool, bool)
Focuses the next control.
- ForEachChild<T>(Action<T>)
Performs some action for the each child of the control.
- GetBackground(VisualControlState)
Gets the background brush for specified state of the control.
- GetBorderSettings(VisualControlState)
Gets the border settings for specified state of the control.
- GetControl(int)
Gets child control at the specified index in the collection of child controls.
- GetDPI()
Returns the DPI of the display used by this control.
- GetDefaultAttributesBgColor()
Gets background color from the default attributes.
- GetDefaultAttributesFgColor()
Gets foreground color from the default attributes.
- GetDefaultAttributesFont()
Gets font from the default attributes.
- GetDefaultFontAndColor()
Gets control's default font and colors as IReadOnlyFontAndColor.
- GetFileSystem()
Gets used IFileSystem provider.
- GetForeground(VisualControlState)
Gets the foreground brush for specified state of the control.
- GetPreferredSize()
Calls GetPreferredSize(SizeD) with PositiveInfinity as a parameter value.
- GetPreferredSize(SizeD)
Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.
- GetRealToolTip()
Gets ToolTip value for use in the native control.
- GetSvgColor(KnownSvgColor)
Gets known svg color depending on the value of IsDarkBackground property.
- GetUpdateClientRect()
Gets the update rectangle region bounding box in client coords. This method can be used in paint events. Returns rectangle in dips (1/96 inch).
- 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.
- Hide()
Conceals the control from the user.
- HideToolTip()
Hides tooltip if it is visible. This method doesn't change ToolTip property.
- Invalidate()
Invalidates the control and causes a paint message to be sent to the control.
- Invalidate(RectD)
Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.
- Invalidate(Region?, bool)
Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.
- Invoke(Action?)
Executes the specified action on the thread that owns the control.
- Invoke(Delegate?)
Executes the specified delegate on the thread that owns the control.
- Invoke(Delegate?, object?[])
Executes the specified delegate, on the thread that owns the control, with the specified list of arguments.
- IsTransparentBackgroundSupported()
Checks whether using transparent background might work.
- Log(object?)
Same as Log(object?, LogItemKind).
- Lower()
Lowers the window to the bottom of the window hierarchy (Z-order). This function only works for top level windows.
- MemberOfGroup(int)
Checks whether this control is a member of the specified group.
- OnLayout()
Called when the control should reposition its child controls.
- PerformLayout(bool)
Forces the control to apply layout logic to child controls.
- PixelFromDip(PointD)
Converts device-independent units to pixels.
- PixelFromDip(RectD)
Converts device-independent units to pixels.
- PixelFromDip(SizeD)
Converts device-independent units to pixels.
- PixelFromDip(double)
Converts device-independent units to pixels.
- PixelToDip(PointI)
Converts PointI to device-independent units.
- PixelToDip(RectI)
Converts RectI to device-independent units.
- PixelToDip(SizeI)
Converts SizeI to device-independent units.
- PixelToDip(int)
Converts pixels to device-independent units.
- PointToClient(PointD)
Computes the location of the specified screen point into client coordinates.
- PointToScreen(PointD)
Computes the location of the specified client point into screen coordinates.
- Raise()
Raises the window to the top of the window hierarchy (Z-order). This function only works for top level windows.
- RaiseClick()
Raises the Click event. See Click event description for more details.
- RaiseIdle()
Raises the Idle event. See Idle event description for more details.
- RecreateWindow()
Forces the re-creation of the underlying native control.
- Refresh()
Forces the control to invalidate itself and immediately redraw itself and any child controls.
- RefreshRect(RectD, bool)
Same as Invalidate(RectD) but has additional parameter
eraseBackground
.
- ReleaseMouseCapture()
Releases the mouse capture, if the control held the capture.
- ResetBackColor()
Resets the BackColor property to its default value.
- ResetBackgroundColor()
Resets bacgkround color to the default value.
- ResetBackgroundColor(ResetColorType)
Resets bacgkround color to the default value.
- ResetCursor()
Resets the Cursor property to its default value.
- ResetFont()
Resets the Font property to its default value.
- ResetForeColor()
Resets foreground color to the default value.
- ResetForegroundColor()
Resets foreground color to the default value.
- ResetForegroundColor(ResetColorType)
Resets foreground color to the default value.
- ResetSuggestedHeight()
Resets SuggestedHeight property.
- ResetSuggestedSize()
Resets SuggestedSize property.
- ResetSuggestedWidth()
Resets SuggestedWidth property.
- ResumeLayout(bool)
Resumes the usual layout logic.
- SaveScreenshot(string)
Saves screenshot of this control.
- ScreenToClient(PointD)
Converts the screen coordinates of a specified point on the screen to client-area coordinates.
- SendToBack()
Sends the control to the back of the z-order.
- SetBackground(Brush?, VisualControlState)
Sets background brush for the specified control state.
- SetBorder(BorderSettings?, VisualControlState)
Sets border settings for the specified control state.
- SetBounds(double, double, double, double, BoundsSpecified)
Sets the specified bounds of the control to new location and size.
- SetChildrenBackgroundColor(Color?, bool)
Sets children background color.
- SetChildrenBackgroundColor<T>(Color?, bool)
Sets children background color.
- SetChildrenFont(Font?, bool)
Sets children font.
- SetChildrenForegroundColor(Color?, bool)
Sets children foreground color.
- SetChildrenForegroundColor<T>(Color?, bool)
Sets children foreground color.
- SetCursor(Cursor?)
Changes Cursor property.
- SetEnabled(bool)
Same as Enabled but implemented as method.
- SetFocus()
Sets input focus to the control.
- SetFocusIfPossible()
Sets input focus to the control if it can accept it.
- SetImage(Image?, VisualControlState)
Sets image for the specified control state.
- SetMouseCapture(bool)
Sets or releases mouse capture.
- SetSizeToContent(WindowSizeToContentMode)
Changes size of the control to fit the size of its content.
- SetText(string?)
Sets value of the Text property.
- SetTitle(string?)
Sets Title property.
- Show()
Displays the control to the user.
- SuspendLayout()
Temporarily suspends the layout logic for the control.
Events
- Activated
Occurs when the window is activated in code or by the user.
- AfterHide
Occurs after control was hidden.
- AfterShow
Occurs after control was shown.
- BackgroundChanged
Occurs when the value of the Background property changes.
- Click
Occurs when the control is clicked.
- CustomLayout
Occurs when the control needs to layout its children.
- Deactivated
Occurs when the window loses focus and is no longer the active window.
- DragDrop
Occurs when a drag-and-drop operation is completed.
- DragEnter
Occurs when an object is dragged into the control's bounds.
- DragLeave
Occurs when an object is dragged out of the control's bounds.
- DragOver
Occurs when an object is dragged over the control's bounds.
- DragStart
Occurs when a drag-and-drop operation needs to be started.
- EnabledChanged
Occurs when the value of the Enabled property changes.
- FontChanged
Occurs when the value of the Font property changes.
- ForegroundChanged
Occurs when the value of the Foreground property changes.
- GotFocus
Occurs when the contol gets focus.
- HandleCreated
Occurs when the control's handle is created.
- HandleDestroyed
Occurs when the control's handle is destroyed.
- HelpRequested
When implemented by a class, occurs when user requests help for a control
- HorizontalAlignmentChanged
Occurs when the value of the HorizontalAlignment property changes.
- Idle
Occurs when the application finishes processing events and is about to enter the idle state. This is the same as Idle but on the control level.
- IsMouseOverChanged
Occurs when the IsMouseOver property value changes.
- KeyDown
Occurs when a key is pressed while the control has focus.
- KeyPress
Occurs when a character, space or backspace key is pressed while the control has focus.
- KeyUp
Occurs when a key is released while the control has focus.
- LocationChanged
Occurs when the control's location is changed.
- LostFocus
Occurs when the control lost focus.
- MarginChanged
Occurs when the value of the Margin property changes.
- MouseCaptureLost
Occurs when the control loses mouse capture.
- MouseDoubleClick
Occurs when the control is double clicked by the mouse.
- MouseDown
Occurs when the mouse pointer is over the control and a mouse button is pressed.
- MouseEnter
Occurs when the mouse pointer enters the control.
- MouseLeave
Occurs when the mouse pointer leaves the control.
- MouseLeftButtonDown
Occurs when the mouse pointer is over the control and left mouse button is pressed.
- MouseLeftButtonUp
Occurs when the mouse pointer is over the control and left mouse button is released.
- MouseMove
Occurs when the mouse pointer is moved over the control.
- MouseRightButtonDown
Occurs when the mouse pointer is over the control and right mouse button is pressed.
- MouseRightButtonUp
Occurs when the mouse pointer is over the control and right mouse button is released.
- MouseUp
Occurs when the mouse pointer is over the control and a mouse button is released.
- MouseWheel
Occurs when the mouse wheel moves while the control has focus.
- PaddingChanged
Occurs when the value of the Padding property changes.
- Paint
Occurs when the control is redrawn.
- ParentChanged
Occurs when Parent is changed.
- ProcessException
Occurs when exception is raised inside AvoidException(Action).
- QueryContinueDrag
Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled.
- Resize
Occurs when the control's size is changed.
- Scroll
Occurs when the user scrolls through the control contents using scrollbars.
- SizeChanged
Occurs when the control's size is changed.
- TextChanged
Occurs when the Text property value changes.
- TitleChanged
Occurs when the value of the Title property changes.
- ToolTipChanged
Occurs when the ToolTip property value changes.
- VerticalAlignmentChanged
Occurs when the value of the VerticalAlignment property changes.
- VisibleChanged
Occurs when the value of the Visible property changes.
- VisualStateChanged
Occurs when the VisualState property value changes.