In This Topic
The following tables list the members exposed by Element.
Public Constructors
Public Properties
| Name | Description |
| AutoHeight | Gets or sets the System.Boolean value specifying whether element height is automatically determined by its style and contents. |
| AutoSize | Gets the System.Boolean value specifying whether element size is automatically determined by its style and contents. |
| AutoWidth | Gets or sets the System.Boolean value specifying whether element width is automatically determined by its style and contents. |
| Bounds | Gets or sets the element's bounds (size and location) within its parent element, in pixels. |
| Children | Gets a list of child elements. |
| ContainsFocus | Gets a value that indicates whether this Element or one of its children has the focus. |
| ContentBounds | Client rectangle, in pixels. This discounts margins, borders, and padding. |
| Enabled | Gets or sets whether the element is enabled (can receive mouse and keyboard messages). |
| Focusable | Gets or sets whether the element is focusable (receives keyboard messages). |
| Focused | Gets a value that indicates whether this Element has the focus. |
| ForceLineBreak | Gets a Element.LineBreak value that determines whether there should be line breaks before and/or after this Element when it occurs in a paragraph. |
| HasChildren | Gets a value that indicates the element has a non-empty Element.Children collection. |
| Height | Element height. Set to -1 to let the element calculate it automatically. |
| HitTestable | Gets or sets whether the element is hit-testable (receives mouse messages). |
| HostControl | Gets the System.Windows.Forms.Control that is hosting this Element. |
| HostView | Gets the IView that is hosting this Element. |
| InheritedRtl | Gets or sets whether the value of RightToLeft property is inherited from the parent element. |
| IsDirty | Gets a value that indicates this element needs to be laid out. |
| IsEnabled | Gets whether this element and all its ancestors are enabled. |
| IsFocusable | Gets whether this element can currently receive the focus. |
| IsHot | Gets or sets whether the element should be displayed using the Style.Hot style. |
| IsPressed | Gets or sets whether the element should be displayed using the Style.Pressed style. |
| IsVisible | Gets whether this element and all its ancestors are visible. |
| Left | Gets or sets the horizontal position of the element within its parent. |
| LineDescent | Gets the portion of the element that renders below the baseline. Usually non-zero only for text elements, depends on font. |
| Location | Gets or sets the location of the element within its parent. |
| Parent | Gets the element's parent, or null if this is the root element. |
| RenderStyle | Gets the element's style, or a default style if the element doesn't have one. This never returns null. |
| RightToLeft | Gets or sets whether the element should be drawn using right-to-left layout. |
| Root | Gets the element's top-level parent. |
| ShowFocusRectangle | Gets or sets whether the element should display a focus rectangle when it has focus. |
| Size | Gets or sets the size of the element. |
| Style | Gets or sets the Style object used to render this Element. |
| Top | Gets or sets the vertical position of the element within its parent. |
| Validated | Gets or sets a value indicating if the contents was successfully validated. |
| Visible | Gets or sets whether the element is visible. |
| Width | Element width. Set to -1 to let the element calculate it automatically. |
Top
Public Methods
| Name | Description |
| ApplicationHasFocus | |
| Clone | Returns a clone of this element. |
| FindMnemonic | Finds the Element that is represented by a given hot key. |
| Focus | Sets the focus to the host control and to this Element within the host control. |
| GetBitmapResource | Gets a System.Drawing.Bitmap from the application's embedded resources. |
| GetBounds | Overloaded. Gets the element's bounds (size and location) within an arbitrary ancestor, in pixels. Ancestor element (parent, grand-parent, etc). A System.Drawing.Rectangle that corresponds to the element's position within the given ancestor. |
| GetFlags | |
| GetImageResource | Gets an System.Drawing.Image from the application's embedded resources. |
| GetParent<T> | Navigates up the tree to find an ancestor of a given type. |
| GetParentOfType | Navigates up the tree to find an ancestor of a given type. |
| GetScrollOrigin | Returns the scroll origin (override to implement non-scrolling areas). |
| HitTest | Returns the element at a given point. |
| Invalidate | Overloaded. Invalidates this Element within the host control. |
| IsChildOf | Determines whether this element is a child of another element. |
| IsInputKey | Determines whether the specified key is a regular input key or a special key that requires preprocessing. |
| Layout | Overloaded. Lays out this element based on its style and contents. |
| Measure | Overloaded. Provides the size, in pixels, of the specified content drawn on the specified System.Drawing.Graphics surface. |
| Offset | Adjusts the location of this element by the specified amount. |
| OnClick | Called by the host control when the user clicks this Element. |
| OnDoubleClick | Called by the host control when the user double-clicks this Element. |
| OnGotFocus | Called by the host control when this Element receives the focus. |
| OnKeyDown | Called by the host control when the user presses a key and this Element has the focus. |
| OnKeyPress | Called by the host control when the user presses a character key and this Element has the focus. |
| OnKeyUp | Called by the host control when the user releases a key and this Element has the focus. |
| OnLostFocus | Called by the host control when this Element loses the focus. |
| OnMouseDown | Called by the host control when the user presses a mouse button over this Element. |
| OnMouseEnter | Called by the host control when the mouse enters this Element. |
| OnMouseEnterHover | Called by the host control when the mouse enters this Element, even if another element has captured the mouse. |
| OnMouseLeave | Called by the host control when the mouse leaves this Element. |
| OnMouseLeaveHover | Called by the host control when the mouse leaves this Element, even if another element has captured the mouse. |
| OnMouseLostCapture | Called by the host control when the user releases the left mouse button over a disabled Element. |
| OnMouseMove | Called by the host control when the mouse moves over this Element. |
| OnMouseUp | Called by the host control when the user releases a mouse button over this Element. |
| OnMouseWheel | Handles MouseWheel events. |
| OnValidated | Called by the host control after the element has been validated. |
| OnValidating | Called by the host control when the element is about to lose focus. |
| PointToClient | Computes the location of the specified screen point into client coordinates. |
| PointToScreen | Computes the location of the specified client point into screen coordinates. |
| Render | Renders the element into a given rectangle. |
| RenderChildren | Renders the child elements into a given rectangle. |
| RenderContent | Render this element's content (no children). |
| SetDirty | Overloaded. Marks this element as dirty, forcing all parent and child elements to be laid out. |
| SetFlags | Overloaded. |
| ThreadHasFocus | |
Top
See Also