Interface IHTMLElement
Interface which publishes to the user the main functionality of each HTML element.
Namespace: Syncfusion.Windows.Forms.HTMLUI
Assembly: Syncfusion.HTMLUI.Windows.dll
Syntax
public interface IHTMLElement
Properties
AccessKey
Gets or sets the hot key which used for fast access of the HTML element.
Declaration
Keys AccessKey { get; set; }
Property Value
Type |
---|
System.Windows.Forms.Keys |
Attributes
Gets the list of attributes set to the current element.
Declaration
IHTMLAttributesCollection Attributes { get; }
Property Value
Type |
---|
IHTMLAttributesCollection |
Children
Gets the sub elements of the current HTML element.
Declaration
IHTMLElementsCollection Children { get; }
Property Value
Type |
---|
IHTMLElementsCollection |
Control
Gets the reference of the control which holds this object.
Declaration
HTMLUIControl Control { get; }
Property Value
Type |
---|
HTMLUIControl |
Events
Gets the list of Events supported by the current element.
Declaration
IHTMLEventsCollection Events { get; }
Property Value
Type |
---|
IHTMLEventsCollection |
Focused
Gets a value indicating whether the element has input focus.
Declaration
bool Focused { get; }
Property Value
Type |
---|
System.Boolean |
Format
Gets the formatting of element used for rendering.
Declaration
IHTMLFormat Format { get; }
Property Value
Type |
---|
IHTMLFormat |
ID
Gets or sets the unique identifier of the HTML element in the HTML elements objects tree. This id is specified by the user.
Declaration
string ID { get; set; }
Property Value
Type |
---|
System.String |
InnerHTML
Gets or sets the HTML inner text of the current HTML element, without the current element declaration.
Declaration
string InnerHTML { get; set; }
Property Value
Type |
---|
System.String |
IsResizable
Gets a value indicating whether the current element is resizable if document is changed.
Declaration
bool IsResizable { get; }
Property Value
Type |
---|
System.Boolean |
IsVisible
Gets a value indicating whether the current element's visibility to user.
Declaration
bool IsVisible { get; }
Property Value
Type |
---|
System.Boolean |
Item[String]
Gets or sets the value for the attribute with the specified attribute name.
Declaration
string this[string attributeName] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | attributeName | String attribute name |
Property Value
Type |
---|
System.String |
Location
Gets the real Location of the element after rendering in control client coordinates.
Declaration
Point Location { get; }
Property Value
Type |
---|
System.Drawing.Point |
Name
Gets the unique name of the HTML element in the HTML elements objects tree.
Declaration
string Name { get; }
Property Value
Type |
---|
System.String |
OuterHTML
Gets the HTML text including the inner and current element text.
Declaration
string OuterHTML { get; }
Property Value
Type |
---|
System.String |
Parent
Gets the parent element of the current element.
Declaration
IHTMLElement Parent { get; }
Property Value
Type |
---|
IHTMLElement |
SelectedText
Gets the selected text of the element and its children.
Declaration
string SelectedText { get; }
Property Value
Type |
---|
System.String |
Size
Gets the real Size of the element after rendering.
Declaration
Size Size { get; }
Property Value
Type |
---|
System.Drawing.Size |
TabIndex
Gets or sets the tab index for the HTML element.
Declaration
int TabIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
Objects with a positive TabIndex are selected in increasing order and in source order to resolve duplicates. Objects with an TabIndex of zero are selected in source order. Objects with a negative TabIndex are omitted from the tabbing order.
Text
Gets the text of the element and its children.
Declaration
string Text { get; }
Property Value
Type |
---|
System.String |
UniqueID
Gets the unique id of the element. Control guarantees that this id is always unique for the document.
Declaration
string UniqueID { get; }
Property Value
Type |
---|
System.String |
Methods
ApplyFormat(IHTMLFormat)
Applies the format to the element.
Declaration
void ApplyFormat(IHTMLFormat format)
Parameters
Type | Name | Description |
---|---|---|
IHTMLFormat | format | Format to be attached to the element. |
BeginUpdate()
Disables event raising by the element.
Declaration
void BeginUpdate()
CalculateFormat()
Calculates the format from arrays of possible formats.
Declaration
void CalculateFormat()
CalculatePosition()
Calculates the position of the element for rendering.
Declaration
void CalculatePosition()
CalculateSize()
Calculates the size of the element from it's content.
Declaration
void CalculateSize()
DrawElement(PaintEventArgs)
Draws the element into the control.
Declaration
void DrawElement(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e | PaintEventArgs instance |
EndUpdate()
Enables event raising by the element.
Declaration
void EndUpdate()
Focus()
Sets the input focus to the element.
Declaration
bool Focus()
Returns
Type | Description |
---|---|
System.Boolean | True if the input focus request was successful; false otherwise. |
Events
BeforeStyleCalculated
Event. Raised before the CSS style of the element ( Format ) is merged.
Declaration
event PreStyleCalculatedEventHandler BeforeStyleCalculated
Event Type
Type |
---|
PreStyleCalculatedEventHandler |
Click
Event. Raised when the mouse is clicked.
Declaration
event EventHandler Click
Event Type
Type |
---|
System.EventHandler |
DoubleClick
Event. Raised when mouse is double clicked.
Declaration
event EventHandler DoubleClick
Event Type
Type |
---|
System.EventHandler |
GotFocus
Event. Raised when the element gets focus.
Declaration
event EventHandler GotFocus
Event Type
Type |
---|
System.EventHandler |
KeyDown
Event. Raised when key is down.
Declaration
event EventHandler KeyDown
Event Type
Type |
---|
System.EventHandler |
KeyPress
Event. Raised when key is pressed.
Declaration
event EventHandler KeyPress
Event Type
Type |
---|
System.EventHandler |
KeyUp
Event. Raised when key is up.
Declaration
event EventHandler KeyUp
Event Type
Type |
---|
System.EventHandler |
Leave
Event. Raised when the element has lost focus.
Declaration
event EventHandler Leave
Event Type
Type |
---|
System.EventHandler |
LocationCalculated
Event. Raised when the location of the element is calculated.
Declaration
event EventHandler LocationCalculated
Event Type
Type |
---|
System.EventHandler |
MouseDown
Event. Raised when mouse button is down.
Declaration
event EventHandler MouseDown
Event Type
Type |
---|
System.EventHandler |
MouseEnter
Event. Raised when mouse enters.
Declaration
event EventHandler MouseEnter
Event Type
Type |
---|
System.EventHandler |
MouseLeave
Event. Raised when mouse leaves.
Declaration
event EventHandler MouseLeave
Event Type
Type |
---|
System.EventHandler |
MouseMove
Event. Raised when mouse moves.
Declaration
event EventHandler MouseMove
Event Type
Type |
---|
System.EventHandler |
Paint
Event. Raised before the element or its part is painted.
Declaration
event ElementPaintEventHandler Paint
Event Type
Type |
---|
ElementPaintEventHandler |
SizeCalculated
Event. Raised when the size of the element is calculated.
Declaration
event EventHandler SizeCalculated
Event Type
Type |
---|
System.EventHandler |
TabIndexChanged
Event. Raised when the TabIndex property value has been changed.
Declaration
event EventHandler TabIndexChanged
Event Type
Type |
---|
System.EventHandler |