Class BaseElement
Base class for all HTML elements. All HTML tag elements must inherit this class.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.HTMLUI
Assembly: Syncfusion.HTMLUI.Windows.dll
Syntax
[AttributeHolder(typeof(HTMLAttributesCollection))]
public abstract class BaseElement : IHTMLElement, ICloneable, IDisposable
Constructors
BaseElement(HTMLUIControl)
Initializes a new instance of the BaseElement class
Declaration
protected BaseElement(HTMLUIControl control)
Parameters
| Type | Name | Description |
|---|---|---|
| HTMLUIControl | control | Control object. |
BaseElement(IHTMLElement, String)
Initializes a new instance of the BaseElement class
Declaration
protected BaseElement(IHTMLElement parent, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | parent | Parent of the element. |
| System.String | name | Name of the element tag. |
BaseElement(IHTMLElement, String, InputHTML)
Initializes a new instance of the BaseElement class
Declaration
protected BaseElement(IHTMLElement parent, string name, InputHTML document)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | parent | Parent element for element. |
| System.String | name | Name of the tag. |
| InputHTML | document | Document instance. |
Fields
BeforeDisposing
Event. Raised before the element is disposed.
Declaration
protected EventHandler BeforeDisposing
Field Value
| Type |
|---|
| System.EventHandler |
DEF_REGEX_OPTIONS
Options for regular expressions.
Declaration
protected const RegexOptions DEF_REGEX_OPTIONS
Field Value
| Type |
|---|
| System.Text.RegularExpressions.RegexOptions |
DEF_RUNTIME
List of default run-time attributes similar to all HTML elements.
Declaration
protected readonly string[] DEF_RUNTIME
Field Value
| Type |
|---|
| System.String[] |
DEF_RUNTIME_LOCATION
Attribute name for location run-time property.
Declaration
protected const string DEF_RUNTIME_LOCATION = "xLocation"
Field Value
| Type |
|---|
| System.String |
DEF_RUNTIME_SIZE
Attribute name for size run-time property.
Declaration
protected const string DEF_RUNTIME_SIZE = "xSize"
Field Value
| Type |
|---|
| System.String |
DEF_RUNTIME_VISIBLE
Attribute name for visible run-time property.
Declaration
protected const string DEF_RUNTIME_VISIBLE = "xVisible"
Field Value
| Type |
|---|
| System.String |
m_blocks
Array of the blocks which represent a single line.
Declaration
protected BlocksCollection m_blocks
Field Value
| Type |
|---|
| BlocksCollection |
m_bounds
Bounds for this element.
Declaration
protected Rectangle m_bounds
Field Value
| Type |
|---|
| System.Drawing.Rectangle |
m_curPos
Indicates where current position is.
Declaration
protected Point m_curPos
Field Value
| Type |
|---|
| System.Drawing.Point |
m_isBlockStructure
Indicates whether element has rectangle structure or not.
Declaration
protected bool m_isBlockStructure
Field Value
| Type |
|---|
| System.Boolean |
m_isPostponed
Indicates whether element must be postponed in new line (div, ...).
Declaration
protected bool m_isPostponed
Field Value
| Type |
|---|
| System.Boolean |
m_oldCursor
Cursor before mouse enters on element.
Declaration
protected Cursor m_oldCursor
Field Value
| Type |
|---|
| System.Windows.Forms.Cursor |
m_ownFormat
Format for special visibility of the element by default.
Declaration
protected HTMLFormat m_ownFormat
Field Value
| Type |
|---|
| HTMLFormat |
Properties
AccessKey
Gets or sets the Fast access key to the element.
Declaration
public Keys AccessKey { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.Keys |
Attributes
Gets the collection of attributes in the current element.
Declaration
public IHTMLAttributesCollection Attributes { get; }
Property Value
| Type |
|---|
| IHTMLAttributesCollection |
Children
Gets the collection of the element's children.
Declaration
public IHTMLElementsCollection Children { get; }
Property Value
| Type |
|---|
| IHTMLElementsCollection |
Control
Gets an instance of the control.
Declaration
public HTMLUIControl Control { get; }
Property Value
| Type |
|---|
| HTMLUIControl |
Document
Gets or sets the document holder for this tag element.
Declaration
protected InputHTML Document { get; set; }
Property Value
| Type |
|---|
| InputHTML |
ElementAttributesPart
Gets the declaration of attributes.
Declaration
protected virtual string ElementAttributesPart { get; }
Property Value
| Type |
|---|
| System.String |
ElementClosePart
Gets the close part of the HTML element tag.
Declaration
protected virtual string ElementClosePart { get; }
Property Value
| Type |
|---|
| System.String |
ElementOpenPart
Gets the declaration of the element.
Declaration
protected virtual string ElementOpenPart { get; }
Property Value
| Type |
|---|
| System.String |
Events
Gets the collection of events supported by the element.
Declaration
public IHTMLEventsCollection Events { get; }
Property Value
| Type |
|---|
| IHTMLEventsCollection |
FocusDefault
Gets or sets a value indicating whether the element processes focus in the default way.
Declaration
protected bool FocusDefault { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Focused
Gets a value indicating whether the element has input focus.
Declaration
public bool Focused { get; }
Property Value
| Type |
|---|
| System.Boolean |
Format
Gets or sets the format of the current element needed for rendering.
Declaration
public IHTMLFormat Format { get; set; }
Property Value
| Type |
|---|
| IHTMLFormat |
Graphics
Gets an object used for measurement of text elements.
Declaration
public static Graphics Graphics { get; }
Property Value
| Type |
|---|
| System.Drawing.Graphics |
HasChildren
Gets a value indicating whether the HTML element has children.
Declaration
public bool HasChildren { get; }
Property Value
| Type |
|---|
| System.Boolean |
Remarks
The check does not create internal children collection thus optimizing memory usage.
HasEvents
Gets a value indicating whether the HTML element has events.
Declaration
public bool HasEvents { get; }
Property Value
| Type |
|---|
| System.Boolean |
Height
Gets or sets the height of the element.
Declaration
public int Height { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
ID
Gets or sets the unique identifier for the HTML element in the HTML elements objects tree. This id is specified by the user.
Declaration
public string ID { get; set; }
Property Value
| Type |
|---|
| System.String |
IndentSpace
Gets the indent values around the element.
Declaration
protected Space IndentSpace { get; }
Property Value
| Type |
|---|
| Space |
InnerHTML
Gets or sets in text, the inner part of the element. Inner part includes the children of the current element. On change of inner part, HTML parser must change if there is need for tree of children. On inner HTML property change, it will lose all attached events. After change, you must attach events again.
Declaration
public string InnerHTML { get; set; }
Property Value
| Type |
|---|
| System.String |
IsAttributeHeight
Gets a value indicating whether the element has height attribute.
Declaration
protected bool IsAttributeHeight { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if element has height attribute. |
IsAttributeWidth
Gets a value indicating whether the element has width attribute.
Declaration
protected bool IsAttributeWidth { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if width attribute is in the element. |
IsCDATA
Gets a value indicating whether the element is CDATA element.
Declaration
protected bool IsCDATA { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsDisposed
Gets a value indicating whether the element is disposed.
Declaration
public bool IsDisposed { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsPostponed
Gets or sets a value indicating whether the element must be postponed to a new line.
Declaration
protected bool IsPostponed { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsResizable
Gets or sets a value indicating whether the element is resizable.
Declaration
public bool IsResizable { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsStyleHeight
Gets a value indicating whether the element has CSS height attribute.
Declaration
protected bool IsStyleHeight { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if element has height in style attribute. |
IsStyleWidth
Gets a value indicating whether the element has CSS width attribute.
Declaration
protected bool IsStyleWidth { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if element has style attribute. |
IsVisible
Gets or sets a value indicating whether the current element is visible to the user.
Declaration
public virtual bool IsVisible { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Item[String]
Gets or sets the value of the element with the specified attribute name.
Declaration
public string this[string attributeName] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | attributeName | String Attribute |
Property Value
| Type |
|---|
| System.String |
Location
Gets or sets the real location of elements after rendering in control client coordinates.
Declaration
public Point Location { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Point |
Name
Gets the name of the tag.
Declaration
public string Name { get; }
Property Value
| Type |
|---|
| System.String |
OuterHTML
Gets the HTML text including inner and current element text; also the current element is added into the output.
Declaration
public string OuterHTML { get; }
Property Value
| Type |
|---|
| System.String |
OwnFormat
Gets the format for special visibility of the element by default.
Declaration
protected virtual HTMLFormat OwnFormat { get; }
Property Value
| Type |
|---|
| HTMLFormat |
Parent
Gets or sets the parent of the current HTML element.
Declaration
public IHTMLElement Parent { get; set; }
Property Value
| Type |
|---|
| IHTMLElement |
QuietMode
Gets or sets a value indicating whether format is in quiet mode, skip event.
Declaration
public bool QuietMode { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
RuntimeAttributes
Gets a list of attributes which is known to the element as run-time properties.
Declaration
public virtual string[] RuntimeAttributes { get; }
Property Value
| Type |
|---|
| System.String[] |
SelectedText
Gets the selected text inside the element.
Declaration
public string SelectedText { get; }
Property Value
| Type |
|---|
| System.String |
Size
Gets or sets the real size of the element after rendering.
Declaration
public Size Size { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Size |
SkipWhiteSpaces
Gets or sets a value indicating whether to skip all whitespaces in the element.
Declaration
protected bool SkipWhiteSpaces { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
SkipWidth
Gets or sets a value indicating whether to skip the width of this element when getting width from parent.
Declaration
protected bool SkipWidth { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
SpaceProhibited
Gets or sets a value indicating whether whitespace after the element must be prohibited.
Declaration
protected bool SpaceProhibited { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Storage
Gets the XML element that represents the current element.
Declaration
protected XmlElement Storage { get; }
Property Value
| Type |
|---|
| System.Xml.XmlElement |
SupportedEvents
Gets the list of events supported by the element.
Declaration
public abstract string[] SupportedEvents { get; }
Property Value
| Type |
|---|
| System.String[] |
TabIndex
Gets or sets the tab index for the HTML element.
Declaration
public 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 inside the element.
Declaration
public string Text { get; }
Property Value
| Type |
|---|
| System.String |
UniqueID
Gets or sets the unique id of the element. Control guarantees that this id is always unique for the document.
Declaration
public string UniqueID { get; set; }
Property Value
| Type |
|---|
| System.String |
Width
Gets or sets the width of the element.
Declaration
public int Width { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
X
Gets or sets the X coordinate of the element location.
Declaration
public int X { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
Y
Gets or sets the Y coordinate of the element location.
Declaration
public int Y { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
Methods
AddBlocksToMain(BaseElement, Block, BlocksCollection)
Adds each block from an array of blocks to the main block.
Declaration
protected void AddBlocksToMain(BaseElement element, Block mainBlock, BlocksCollection blocks)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Current element object. |
| Block | mainBlock | Main block container. |
| BlocksCollection | blocks | Blocks for inserting into the main block. |
AddElement(Block, Object, Rectangle)
Adds element to the block and moves if needed all previous elements in the block.
Declaration
protected void AddElement(Block block, object key, Rectangle value)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Block element. |
| System.Object | key | Element for adding to the block. |
| System.Drawing.Rectangle | value | Rectangle which key reserves. |
ApplyFormat(IHTMLFormat)
Applies the specified format to the element.
Declaration
public void ApplyFormat(IHTMLFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLFormat | format | Format to be attached to the element. |
Attributes_Changed(Object, BeforeValueChangedEventArgs)
Runs when attributes have been changed. In some cases, control must react on this.
Declaration
protected virtual void Attributes_Changed(object sender, BeforeValueChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | Sender of changed event. |
| BeforeValueChangedEventArgs | e | Additional parameters. |
BeginUpdate()
Disables event raising by element.
Declaration
public void BeginUpdate()
BreakText(Text, Block)
Breaks the string text into two parts. First is in the same line, another into a new line.
Declaration
protected void BreakText(Text node, Block block)
Parameters
| Type | Name | Description |
|---|---|---|
| Text | node | Text which must be broken and inserted in two lines. |
| Block | block | First block (for first part of text). |
CalculateBlockChildPos(BaseElement)
Detects the type of the block element and invokes the corresponding method.
Declaration
protected void CalculateBlockChildPos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Child element. |
CalculateBlockFixedSizePos(BaseElement)
Calculates the position for the child element with type "BlockFixedSize".
Declaration
protected void CalculateBlockFixedSizePos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Child element. |
CalculateBlockNewLineFixedSizePos(BaseElement)
Calculates the position for the child element with type "BlockNewLineFixedSize".
Declaration
protected void CalculateBlockNewLineFixedSizePos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Child element. |
CalculateBlockNewLineResizablePos(BaseElement)
Calculates the position for the child element with type "BlockNewLineResizable".
Declaration
protected void CalculateBlockNewLineResizablePos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Chile element. |
CalculateBlockNewLineSimplePos(BaseElement)
Calculates the position for the child element with type "BlockNewLineSimple".
Declaration
protected void CalculateBlockNewLineSimplePos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Child element. |
CalculateBlockResizablePos(BaseElement)
Calculates the position for the child element with type "BlockResizable".
Declaration
protected void CalculateBlockResizablePos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Child element. |
CalculateBlockSimplePos(BaseElement)
Calculates the position for the child element with type "BlockSimplePos".
Declaration
protected void CalculateBlockSimplePos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Child element. |
CalculateChildPosFromType(BaseElement)
Detects the type of the child element and invokes corresponding method to calculate position.
Declaration
protected void CalculateChildPosFromType(BaseElement child)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | child | Child element. |
CalculateChildPositions(Point, Rectangle)
Calculates the positions of each child of the element.
Declaration
protected virtual BlocksCollection CalculateChildPositions(Point curPosition, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | curPosition | Position of the cursor |
| System.Drawing.Rectangle | bounds | Rectangle bounds |
Returns
| Type | Description |
|---|---|
| BlocksCollection | BlockCollection instance |
CalculateElementPos(Int32, Block)
Calculates the position of the HTML element.
Declaration
protected void CalculateElementPos(int count, Block block)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | count | Index of the child element. |
| Block | block | Current block. |
CalculateFormat()
Calculates the format of elements from an array of possible formats.
Declaration
public void CalculateFormat()
CalculateInlineChildPos(BaseElement)
Calculates the position for the inline child element.
Declaration
protected void CalculateInlineChildPos(BaseElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseElement | element | Child element. |
CalculateInnerHTML()
Builds the string which represents InnerHTML of the current element.
Declaration
protected virtual string CalculateInnerHTML()
Returns
| Type | Description |
|---|---|
| System.String | Inner XML content. |
CalculatePosition()
Calculates the position of the element.
Declaration
public void CalculatePosition()
CalculateSize()
Calculates the size of the element for rendering.
Declaration
public void CalculateSize()
CalculateTextPos(Text, Block)
Calculates the position of the text element.
Declaration
protected virtual void CalculateTextPos(Text node, Block block)
Parameters
| Type | Name | Description |
|---|---|---|
| Text | node | Text element node. |
| Block | block | Current block. |
ChangeStartPosition(Block)
Overloaded. Defines the start position for the block.
Declaration
protected void ChangeStartPosition(Block block)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Block which was filled (may be NULL if there are no filled blocks). |
ChangeStartPosition(Rectangle)
Defines the start position for the block if we want to add a new child TAG element.
Declaration
protected void ChangeStartPosition(Rectangle childRect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | childRect | Rectangle for changing position. |
ChildrenFormatMerge(IHTMLElement, Boolean)
Re-merges the formats for all the children of the element.
Declaration
protected virtual void ChildrenFormatMerge(IHTMLElement element, bool bMergeOfElement)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for reaction performing. |
| System.Boolean | bMergeOfElement | If True - merges format of element. |
ChildrenFormatMergeAndRecalcDoc(IHTMLElement)
Re-merges all the children formats and recalculates the document.
Declaration
protected virtual void ChildrenFormatMergeAndRecalcDoc(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for reaction performing. |
ChildrenFormatMergeAndRepaintDoc(IHTMLElement)
Re-merges the formats for all children of the element and repaints the document.
Declaration
protected virtual void ChildrenFormatMergeAndRepaintDoc(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for reaction performing. |
ClientToGlobal(Rectangle)
Overloaded. Translates logical rectangle to client rectangle.
Declaration
protected Rectangle ClientToGlobal(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | rect | Rectangle for converting attributes. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle | Changed rectangle. |
ClientToGlobal(RectangleF)
Translates logical rectangle to client rectangle.
Declaration
protected RectangleF ClientToGlobal(RectangleF rect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | rect | Rectangle for converting attributes. |
Returns
| Type | Description |
|---|---|
| System.Drawing.RectangleF | Changed rectangle. |
Clone()
Clone class members.
Declaration
public virtual object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | Returns a new instance of the class with the same parameters set. |
CreateBlock(Block)
Creates a new block, resizes the element and changes the start position of the new block.
Declaration
protected virtual Block CreateBlock(Block oldBlock)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | oldBlock | Current active block. |
Returns
| Type | Description |
|---|---|
| Block | Block which is created. |
CreateEvent(String)
Creates an instance of the event class which knows how to attach user delegates to the element internal event.
Declaration
public IHTMLEvent CreateEvent(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the event. Case insensitive. |
Returns
| Type | Description |
|---|---|
| IHTMLEvent | NULL if event is not supported; instance of the event class otherwise. |
DefGetSize()
Calculates the size of the element without border and spacing values.
Declaration
protected virtual Size DefGetSize()
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size of the element. |
DefGetSizeInTable()
Calculates the size of the element without border and spacing values. Element is inside table.
Declaration
protected virtual Size DefGetSizeInTable()
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size of element in the table. |
DefGetSizeWithAttributes()
Calculates the size of the element with borders, spaces, etc.
Declaration
protected Size DefGetSizeWithAttributes()
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size of element with borders, etc. |
Dispose()
Disposes all resources and invokes this method in all child elements.
Declaration
public void Dispose()
Draw(PaintEventArgs)
Draws an element.
Declaration
protected void Draw(PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.PaintEventArgs | e | Event arguments. |
DrawBlock(Block, PaintEventArgs)
Raises the event before block painting and if there are no event handlers, raises the default painting.
Declaration
protected virtual void DrawBlock(Block block, PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Block for drawing. |
| System.Windows.Forms.PaintEventArgs | e | Paint arguments. |
DrawBorders(Block, Graphics)
Draw borders for the element.
Declaration
protected void DrawBorders(Block block, Graphics g)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Block Instance |
| System.Drawing.Graphics | g | Graphics context. |
DrawElement(PaintEventArgs)
Draws an element.
Declaration
public void DrawElement(PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.PaintEventArgs | e | Event arguments. |
DrawText(Graphics, Rectangle, Text, Block)
Draws text in the element.
Declaration
protected virtual void DrawText(Graphics g, Rectangle rect, Text text, Block parent)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | Graphics context. |
| System.Drawing.Rectangle | rect | Rectangle for output. |
| Text | text | Text object. |
| Block | parent | Parent block for the text. |
ElementInSameBlock(Rectangle)
Indicates whether the child element is located in the current block of the current element.
Declaration
protected bool ElementInSameBlock(Rectangle childRect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | childRect | Rectangle of the child block. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if child element is located in the current block of the current element; false otherwise. |
EndUpdate()
Enables event raising by element.
Declaration
public void EndUpdate()
ExpandBounds(Rectangle)
Expands the rectangle by space of the element.
Declaration
protected virtual Rectangle ExpandBounds(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | rect | Rectangle for expanding. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle | Expanded rectangle. |
ExpandHeight(Int32)
Reduces the height by space of the element.
Declaration
protected virtual int ExpandHeight(int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | height | Width of the block. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Height after expanding. |
ExpandLocation(Point)
Shifts the location by element's space to the left / top.
Declaration
protected virtual Point ExpandLocation(Point location)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | location | Point structure object. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Point | Shifted location. |
ExpandWidth(Int32)
Expands the width by space of the element.
Declaration
protected virtual int ExpandWidth(int width)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | width | Width of the block. |
Returns
| Type | Description |
|---|---|
| System.Int32 | New width value. |
Finalize()
Finalizes an instance of the BaseElement class
Declaration
protected void Finalize()
Focus()
Sets input focus to the element.
Declaration
public bool Focus()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the input focus request was successful; false otherwise. |
GetArray(Hashtable)
Returns an array of formats by its Unique ID.
Declaration
protected ArrayList GetArray(Hashtable formatsHash)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Hashtable | formatsHash | Hash of formats. |
Returns
| Type | Description |
|---|---|
| System.Collections.ArrayList | Array of formats by UniqueID. |
GetBlockParent()
Searches the block parent element for the current element.
Declaration
protected BaseElement GetBlockParent()
Returns
| Type | Description |
|---|---|
| BaseElement | Block parent for element if it exists; Null otherwise. |
GetElementLevel(IHTMLElement)
Returns the element level in the current document.
Declaration
public static int GetElementLevel(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element whose level is needed. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Level of element in the document tree. |
GetFormatFromAttributes()
If element has attributes, attaches it to the formats.
Declaration
protected virtual HTMLFormat GetFormatFromAttributes()
Returns
| Type | Description |
|---|---|
| HTMLFormat | HTMLUIFormat object |
GetFreeWidthInLine(Block, Int32)
Returns the amount of free space in current line. Free space depends on current X pos and horizontal alignment.
Declaration
protected int GetFreeWidthInLine(Block block, int curX)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Block instance |
| System.Int32 | curX | Current X coordinate on the line. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Width in the current line. |
GetHeightFromParent()
Returns the height of the first nearest parent which has a block structure (IsBlock == True).
Declaration
protected virtual int GetHeightFromParent()
Returns
| Type | Description |
|---|---|
| System.Int32 | Height of the element according to height of parent. |
GetInheritedFormat()
Returns cloned format with inherited options.
Declaration
protected HTMLFormat GetInheritedFormat()
Returns
| Type | Description |
|---|---|
| HTMLFormat | Cloned format with inherited options. |
GetInnerHeightFromParent()
Returns the height of the first nearest parent which has a block structure (IsBlock == True).
Declaration
protected virtual int GetInnerHeightFromParent()
Returns
| Type | Description |
|---|---|
| System.Int32 | Height of the element according to height of parent. |
GetInnerWidthFromParent()
Returns the inner width of the first nearest parent which has a block structure (IsBlock == True).
Declaration
protected virtual int GetInnerWidthFromParent()
Returns
| Type | Description |
|---|---|
| System.Int32 | Width according to parent width. |
GetMaxWidth()
Returns the width of the area in which an element can be drawn.
Declaration
protected int GetMaxWidth()
Returns
| Type | Description |
|---|---|
| System.Int32 | Width of the area in which an element can be drawn. |
GetMaxWidthForTextSizing()
Returns the maximum width for the element when the size of text is being calculated inside the element. Used during sizing only.
Declaration
protected int GetMaxWidthForTextSizing()
Returns
| Type | Description |
|---|---|
| System.Int32 | Maximum width for the element when the size of text is being calculated inside the element. Used during sizing only. |
GetParentForEvent(String)
Returns the parent element which supports the specified event.
Declaration
protected BaseElement GetParentForEvent(string eventName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | eventName | Name of the event. |
Returns
| Type | Description |
|---|---|
| BaseElement | Parent element for the event. |
GetRealMaxWidth(String, Int32, HTMLFormat)
Returns the real max size of the string.
Declaration
protected virtual int GetRealMaxWidth(string str, int max, HTMLFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | str | String text. |
| System.Int32 | max | Max width. |
| HTMLFormat | format | Format object. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Real max width for the text. |
GetRemainderWidth(Block, Int32)
Returns the remainder which is in bounds in the current line when horizontal align is left.
Declaration
protected int GetRemainderWidth(Block block, int curWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Current block. |
| System.Int32 | curWidth | Current width of the block. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Remaining width in the block. |
GetWidthFromParent()
Returns the width of the first nearest parent which has a block structure (IsBlock == True).
Declaration
protected virtual int GetWidthFromParent()
Returns
| Type | Description |
|---|---|
| System.Int32 | Width according to parent width. |
GetWidthToBorder(Block, Int32)
Calculates the width from the current position to the control depending on alignment.
Declaration
protected int GetWidthToBorder(Block block, int curWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Current block. |
| System.Int32 | curWidth | Current width of the block. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Width of current point to border of the block. |
GlobalToClient(Rectangle)
Overloaded. Translates client rectangle to global rectangle.
Declaration
protected Rectangle GlobalToClient(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | rect | Rectangle for converting attributes. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle | Changed rectangle. |
GlobalToClient(RectangleF)
Translates client rectangle to global rectangle.
Declaration
protected RectangleF GlobalToClient(RectangleF rect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.RectangleF | rect | Rectangle for converting attributes. |
Returns
| Type | Description |
|---|---|
| System.Drawing.RectangleF | Changed rectangle. |
HideToolTip()
Hides ToolTip on the element.
Declaration
protected void HideToolTip()
InFillBlocks(String)
Divides the string into words and returns an array of words.
Declaration
protected ArrayList InFillBlocks(string str)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | str | Regex pattern. |
Returns
| Type | Description |
|---|---|
| System.Collections.ArrayList | Collection of results. |
InfillFromXMLElement(HTMLUIControl, XmlElement)
Converts from XML element to our own elements.
Declaration
public virtual void InfillFromXMLElement(HTMLUIControl control, XmlElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| HTMLUIControl | control | HTMLUI control |
| System.Xml.XmlElement | element | XmlElement instance |
InFillTextSizeHash()
Overloaded. Infills hash with each text block of the element as key and the size of the block as value.
Declaration
protected virtual Size InFillTextSizeHash()
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size of the max text in the element. |
InFillTextSizeHash(XmlNode, Int32)
Infills hash with each text block of the element as key and the size of the block as value. Maximum length is defined.
Declaration
protected virtual Size InFillTextSizeHash(XmlNode text, int maxLength)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlNode | text | XmlNode instance |
| System.Int32 | maxLength | Maximum length |
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size of the max text in the element. |
InitializeCollections()
Initializes all collections and variables.
Declaration
protected void InitializeCollections()
InitializeElement()
Virtual method for initialization of the element. It is invoked after element creating. By overriding this method, element can initialize its special properties.
Declaration
protected virtual void InitializeElement()
InsertText(Text, Block, Size)
Inserts the text node into the block element.
Declaration
protected void InsertText(Text node, Block block, Size size)
Parameters
| Type | Name | Description |
|---|---|---|
| Text | node | Current text node. |
| Block | block | Current block. |
| System.Drawing.Size | size | Size of the text. |
IsAttributeRuntime(String)
Indicates whether the specified name of the attribute belongs to list of run-time attributes.
Declaration
public bool IsAttributeRuntime(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name which must be checked. Case insensitive. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if attribute with specified name is a run-time attribute; false otherwise. |
IsEventSupported(String)
Indicates whether the specified name belongs to the list of supported events.
Declaration
public bool IsEventSupported(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name which must be checked. Case insensitive. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if event is supported; false otherwise. |
IsGoodWidth(Block, Int32, Int32)
Indicates whether the width of the child is larger than the element width.
Declaration
protected bool IsGoodWidth(Block block, int curX, int elementWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Block in which we want to insert the element. |
| System.Int32 | curX | Current X coordinate. |
| System.Int32 | elementWidth | Width of the element. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if free space is suitable for the block. |
LeaveFocus()
Raises the Leave Focus event.
Declaration
protected virtual void LeaveFocus()
MakeBottomIndent(Int32)
Makes indent below the element.
Declaration
protected virtual void MakeBottomIndent(int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | height | Height value. |
MakeTopIndent(Int32)
Makes indent above the element.
Declaration
protected virtual void MakeTopIndent(int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | height | Height of block height. |
MeasureString(String, HTMLFormat, Int32)
Overloaded. Calculates the size of the rectangle which is needed to output the string text.
Declaration
protected Size MeasureString(string str, HTMLFormat format, int maxLength)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | str | String for measuring. |
| HTMLFormat | format | Format object. |
| System.Int32 | maxLength | Max length for the string. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size for this text. |
MeasureString(String, Font)
Calculates the size of rectangle which is needed to output the string text.
Declaration
protected Size MeasureString(string str, Font font)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | str | String to be measured. |
| System.Drawing.Font | font | Font object. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size for this text. |
MeasureString(String, Font, Int32)
Calculates the size of rectangle which is needed to output the string text.
Declaration
protected Size MeasureString(string str, Font font, int maxLength)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | str | String to be measured. |
| System.Drawing.Font | font | Font object. |
| System.Int32 | maxLength | Max length of the text. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Size | Size for this text. |
MoveFinalCurPos(ref Point)
Changes its parent current position. Needed if element makes space after itself.
Declaration
protected virtual void MoveFinalCurPos(ref Point currentPos)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | currentPos | Global current position. |
MoveStartCurPos(ref Point)
Changes its parent current position.Needed if element makes space before itself.
Declaration
protected virtual void MoveStartCurPos(ref Point currentPos)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | currentPos | Global current position. |
NoWrapEnabled()
Indicates whether the nowrap attribute is enabled.
Declaration
protected bool NoWrapEnabled()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the attribute is set; False otherwise. |
OnAccessKeyChanged(ValueChangedEventArgs)
Called when AccessKey property changes. This is the best place for custom logic.
Declaration
protected virtual void OnAccessKeyChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | Event arguments. |
OnBeforeDisposing(EventArgs)
Raises the BeforeDisposing event.
Declaration
protected virtual void OnBeforeDisposing(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event data. |
OnBeforeStyleCalculated(PreStyleCalculatedEventArgs)
Raises the BeforeStyleCalculated event.
Declaration
protected virtual void OnBeforeStyleCalculated(PreStyleCalculatedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| PreStyleCalculatedEventArgs | args | Event arguments. |
OnDispose()
Method must be overridden by inheritors if it has some additional resources to dispose.
Declaration
protected virtual void OnDispose()
OnFormatChanged(IHTMLElement, HTMLFormat, HTMLFormat)
Raised when format of the element has been changed.
Declaration
protected virtual void OnFormatChanged(IHTMLElement element, HTMLFormat oldFormat, HTMLFormat newFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Parent element of formats. |
| HTMLFormat | oldFormat | Old format. |
| HTMLFormat | newFormat | New format. |
OnFormatChanged(ValueChangedEventArgs)
Raises the FormatChanged event.
Declaration
protected virtual void OnFormatChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | Event arguments. |
OnInnerHTMLChanged(ValueChangedEventArgs)
When InnerHTML property changes, this method will be called in the ReparseInnerHTML class method, which makes all others work for you.
Declaration
protected virtual void OnInnerHTMLChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | Event arguments. |
OnLocationCalculated(EventArgs)
Raises the LocationCalculated event.
Declaration
protected virtual void OnLocationCalculated(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
OnPaint(ElementPaintEventArgs)
Raises the Paint event.
Declaration
protected virtual bool OnPaint(ElementPaintEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementPaintEventArgs | args | Event arguments. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if someone is subscribed on this event; false otherwise. |
OnParentChanged(ValueChangedEventArgs)
Called by parent property set part. This is best place for any logic which must control parent property changes (for inheritors).
Declaration
protected virtual void OnParentChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | Event arguments. |
OnQuietModeChanged()
Raised when QuietMode property is changed.
Declaration
protected virtual void OnQuietModeChanged()
OnRuntimeAttributeChanged(String, ValueChangedEventArgs)
Raises RuntimeAttributeChanged event.
Declaration
protected virtual void OnRuntimeAttributeChanged(string name, ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the event. |
| ValueChangedEventArgs | args | Event arguments. |
OnSizeCalculated(EventArgs)
Raises the SizeCalculated event.
Declaration
protected virtual void OnSizeCalculated(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
OnUniqueIDChanged(ValueChangedEventArgs)
Called when UniqueID property is changed. This is the best place for custom logic.
Declaration
protected virtual void OnUniqueIDChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | Event arguments. |
PreparePositioning(Point, Rectangle)
Prepares the element to position it's content.
Declaration
protected virtual void PreparePositioning(Point currentPosition, Rectangle bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | currentPosition | Current start position for this element. |
| System.Drawing.Rectangle | bounds | Bound for this element. |
ProcessDrawBlock(Block, PaintEventArgs)
Draws data in block which represents a single line.
Declaration
protected virtual void ProcessDrawBlock(Block block, PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| Block | block | Current block. |
| System.Windows.Forms.PaintEventArgs | e | Paint arguments. |
ProcessSelection()
Processes the selection algorithm.
Declaration
protected void ProcessSelection()
ProhibitSpaceAfter()
Sets the value indicating whether trailing whitespace must be allowed after element.
Declaration
protected virtual void ProhibitSpaceAfter()
ProhibitSpaceBefore()
Sets the value indicating whether trailing whitespace must be allowed at the beginning of the element.
Declaration
protected virtual void ProhibitSpaceBefore()
RaiseAccessKeyChanged(ValueChangedEventArgs)
Raises the AccesssKeysChange event.
Declaration
protected void RaiseAccessKeyChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | ValueChangedEventArgs instance |
RaiseBeforeDisposing(EventArgs)
Raises the BeforeDisposing event.
Declaration
protected virtual void RaiseBeforeDisposing(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseBeforeStyleCalculated(PreStyleCalculatedEventArgs)
Raises the BeforeStyleCalculated event.
Declaration
protected void RaiseBeforeStyleCalculated(PreStyleCalculatedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| PreStyleCalculatedEventArgs | args | PreStyleCalculatedEventArgs instance |
RaiseClickEvent(EventArgs)
Raises the Mouse Click event.
Declaration
protected virtual void RaiseClickEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseDoubleClickEvent(EventArgs)
Raises the Mouse Double Click event.
Declaration
protected virtual void RaiseDoubleClickEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseFormatChanged(ValueChangedEventArgs)
Raises the FormatChanged event.
Declaration
protected void RaiseFormatChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | ValueChangedEventArgs instance |
RaiseGotFocusEvent(EventArgs)
Raises the GotFocus event.
Declaration
protected virtual void RaiseGotFocusEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseInnerHTMLChanged(ValueChangedEventArgs)
Raises the InnerHTMLChanged event.
Declaration
protected void RaiseInnerHTMLChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | ValueChangedEventArgs instance |
RaiseKeyDownEvent(EventArgs)
Raises the Key Down event.
Declaration
protected virtual void RaiseKeyDownEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseKeyPressEvent(EventArgs)
Raises the Key Press event.
Declaration
protected virtual void RaiseKeyPressEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseKeyUpEvent(EventArgs)
Raises the Key Up event.
Declaration
protected virtual void RaiseKeyUpEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseLeaveEvent(EventArgs)
Raises the Leave event.
Declaration
protected virtual void RaiseLeaveEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseLocationCalculated(EventArgs)
Raises the LocationCalculated event.
Declaration
protected void RaiseLocationCalculated(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseMouseDownEvent(EventArgs)
Raises the Mouse Move Down event.
Declaration
protected virtual void RaiseMouseDownEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseMouseEnterEvent(EventArgs)
Raises the Mouse Enter event.
Declaration
protected virtual void RaiseMouseEnterEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseMouseLeaveEvent(EventArgs)
Raises the Mouse Leave event.
Declaration
protected virtual void RaiseMouseLeaveEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseMouseMoveEvent(EventArgs)
Raises the Mouse Move event.
Declaration
protected virtual void RaiseMouseMoveEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseOnPaint(ElementPaintEventArgs)
Raises the OnPaint event.
Declaration
protected bool RaiseOnPaint(ElementPaintEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementPaintEventArgs | args | Paint arguments. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if someone is subscribed on this event; otherwise False. |
RaiseParentChanged(ValueChangedEventArgs)
Raises the ParentChanged event on parent property value change.
Declaration
protected void RaiseParentChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | ValueChangedEventArgs instance |
RaiseQuietModeChangedEvent()
Raises the Quite Mode Changed event when mode changes.
Declaration
protected void RaiseQuietModeChangedEvent()
RaiseRuntimeAttributeChanged(String, ValueChangedEventArgs)
Raises the RuntimeAttributeChanged event.
Declaration
protected void RaiseRuntimeAttributeChanged(string name, ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the attribute. |
| ValueChangedEventArgs | args | Event arguments. |
RaiseSizeCalculated(EventArgs)
Raises the SizeCalculated event.
Declaration
protected void RaiseSizeCalculated(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseTabIndexChangedEvent(EventArgs)
Raises the TabIndexChanged event.
Declaration
protected virtual void RaiseTabIndexChangedEvent(EventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | args | Event arguments. |
RaiseUniqueIDChanged(ValueChangedEventArgs)
Raises the UniqueIDChanged event.
Declaration
protected void RaiseUniqueIDChanged(ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ValueChangedEventArgs | args | ValueChangedEventArgs instance |
ReCalculateDocument()
Recalculates the document and repaints the control.
Declaration
protected virtual void ReCalculateDocument()
ReConvertInnerHTML(XmlElement, IHTMLElement)
Reconverts all children to tree of objects.
Declaration
protected virtual IHTMLElement ReConvertInnerHTML(XmlElement xmlCurrent, IHTMLElement elementParent)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlElement | xmlCurrent | Current XML element. |
| IHTMLElement | elementParent | Parent HTML element object. |
Returns
| Type | Description |
|---|---|
| IHTMLElement | Created HTML element object. |
ReduceBounds(Rectangle)
Reduces the rectangle by space of the element.
Declaration
protected virtual Rectangle ReduceBounds(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | rect | Rectangle for bounds reducing. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle | Rectangle with new attributes. |
ReduceHeight(Int32)
Reduces the height by space of the element.
Declaration
protected virtual int ReduceHeight(int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | height | Width of the block. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Height after reducing. |
ReduceLocation(Point)
Shifts the location by element's space to the right / bottom.
Declaration
protected virtual Point ReduceLocation(Point location)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | location | Point structure object. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Point | Shifted location. |
ReduceWidth(Int32)
Reduces the width by space of the element.
Declaration
protected virtual int ReduceWidth(int width)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | width | Width of the block. |
Returns
| Type | Description |
|---|---|
| System.Int32 | New width value. |
ReFormatCrtDocAndReCalcDoc(IHTMLElement)
Recreates the formats for the document and recalculates the current document.
Declaration
protected virtual void ReFormatCrtDocAndReCalcDoc(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element where event has been raised. |
ReFormatCrtElmAndReCalcDoc(IHTMLElement)
Creates the format for the element and recalculates the current document.
Declaration
protected virtual void ReFormatCrtElmAndReCalcDoc(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for reaction performing. |
ReFormatMergeElement(IHTMLElement)
Re-merges the format for the element.
Declaration
protected virtual void ReFormatMergeElement(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for remerging formats. |
ReFormatMergElmAndChildrenAndReCalcDoc(IHTMLElement)
Re-merges the format of element and its children and recalculates the document.
Declaration
protected virtual void ReFormatMergElmAndChildrenAndReCalcDoc(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for reaction performing. |
ReFormatMergElmAndReCalcDoc(IHTMLElement)
Recalculates the format for the element and recalculates the current document.
Declaration
protected virtual void ReFormatMergElmAndReCalcDoc(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for which attribute has been changed. |
RePaintDocument()
Repaints the document.
Declaration
protected virtual void RePaintDocument()
RePaintElement(IHTMLElement)
Repaints the element.
Declaration
protected virtual void RePaintElement(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for reaction performing. |
ReparseInnerHTML(String)
When InnerHTML changes, this method code reparses the InnerHTML string and builds a new sub-elements tree.
Declaration
protected virtual void ReparseInnerHTML(string htmlToParse)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | htmlToParse | Here we put HTML which must be first converted to XHTML and then set as InnerXML of the current storage. |
RePositionDocument()
Recalculates the position of the document.
Declaration
protected virtual void RePositionDocument()
RePositionElement(IHTMLElement)
Recalculates the position of the element.
Declaration
protected virtual void RePositionElement(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for reaction performing. |
ResizeElement()
Resizes the element if inside blocks are bigger than the element.
Declaration
protected void ResizeElement()
SetElementStyle()
Sets the element's style to FixedSize if width or height attributes have been defined.
Declaration
protected void SetElementStyle()
SetFirstFormat(ArrayList)
Inserts the first format in the collection.
Declaration
protected virtual void SetFirstFormat(ArrayList formats)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ArrayList | formats | Array of formats. |
SetFormat(HTMLFormat)
Sets the format to the element.
Declaration
protected void SetFormat(HTMLFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| HTMLFormat | format | HTMLUIFormat instance |
SetLastCurrentPosition()
Sets the current position of the element after its positioning. Needed for its parent element.
Declaration
protected void SetLastCurrentPosition()
SetOwnFormat(ArrayList, Hashtable)
Inserts own format into the format array.
Declaration
protected void SetOwnFormat(ArrayList formats, Hashtable formatsHash)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ArrayList | formats | Array of formats. |
| System.Collections.Hashtable | formatsHash | Hashtable of formats. |
ShiftStartPos(Point)
Shifts the start position of the element.
Declaration
protected virtual Point ShiftStartPos(Point position)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | position | Start position. |
Returns
| Type | Description |
|---|---|
| System.Drawing.Point | Point instance |
ShowToolTip()
Shows ToolTip on the element.
Declaration
protected virtual void ShowToolTip()
SplitText(String, Int32, out ArrayList)
Breaks the text into two parts by word and length (if all text can't be in bounds element).
Declaration
protected string[] SplitText(string str, int length, out ArrayList tokens)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | str | String text. |
| System.Int32 | length | Length which remains in first line |
| System.Collections.ArrayList | tokens | Array of the remaining words. |
Returns
| Type | Description |
|---|---|
| System.String[] | Array of two parts of the string. |
SplitTextToLines(ArrayList, Int32, out ArrayList)
Splits the string represented by an array into lines of text whose length is less than defined.
Declaration
protected ArrayList SplitTextToLines(ArrayList tokens, int length, out ArrayList sizes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ArrayList | tokens | Array of words. |
| System.Int32 | length | Max width of the line. |
| System.Collections.ArrayList | sizes | Array of sizes of those lines. |
Returns
| Type | Description |
|---|---|
| System.Collections.ArrayList | Array of lines. |
SyncTabStopCollection(Int32)
Adds / removes element from TabStop collection depending on TabStop value assigned.
Declaration
protected virtual void SyncTabStopCollection(int tabIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | tabIndex | TabIndex of element. |
Events
AccessKeyChanged
Utility event. Raised when AccessKey property change.
Declaration
public event ValueChangedEventHandler AccessKeyChanged
Event Type
| Type |
|---|
| ValueChangedEventHandler |
BeforeStyleCalculated
Event. Raised before the CSS style of the element (Format) is merged.
Declaration
public event PreStyleCalculatedEventHandler BeforeStyleCalculated
Event Type
| Type |
|---|
| PreStyleCalculatedEventHandler |
Click
Event. Raised when the mouse is clicked.
Declaration
[ElementEvent("RaiseClickEvent")]
public event EventHandler Click
Event Type
| Type |
|---|
| System.EventHandler |
DoubleClick
Event. Raises when the mouse double clicked.
Declaration
[ElementEvent("RaiseDoubleClickEvent")]
public event EventHandler DoubleClick
Event Type
| Type |
|---|
| System.EventHandler |
FormatChanged
Utility event. Raised when Format property changes.
Declaration
public event ValueChangedEventHandler FormatChanged
Event Type
| Type |
|---|
| ValueChangedEventHandler |
GotFocus
Event. Raised when the element gets focus.
Declaration
[ElementEvent("RaiseGotFocusEvent")]
public event EventHandler GotFocus
Event Type
| Type |
|---|
| System.EventHandler |
InnerHTMLChanged
Utility event. Raised when InnerHTML property changes.
Declaration
public event ValueChangedEventHandler InnerHTMLChanged
Event Type
| Type |
|---|
| ValueChangedEventHandler |
KeyDown
Event. Raised when Key Down.
Declaration
[ElementEvent("RaiseKeyDownEvent")]
public event EventHandler KeyDown
Event Type
| Type |
|---|
| System.EventHandler |
KeyPress
Event. Raised when key is pressed.
Declaration
[ElementEvent("RaiseKeyPressEvent")]
public event EventHandler KeyPress
Event Type
| Type |
|---|
| System.EventHandler |
KeyUp
Event. Raised when Key Up.
Declaration
[ElementEvent("RaiseKeyUpEvent")]
public event EventHandler KeyUp
Event Type
| Type |
|---|
| System.EventHandler |
Leave
Event. Raises when the element has lost focus.
Declaration
[ElementEvent("RaiseLeaveEvent")]
public event EventHandler Leave
Event Type
| Type |
|---|
| System.EventHandler |
LocationCalculated
Event. Raised when the location of the element is calculated.
Declaration
public event EventHandler LocationCalculated
Event Type
| Type |
|---|
| System.EventHandler |
MouseDown
Event. Raised when the mouse button is pressed down.
Declaration
[ElementEvent("RaiseMouseDownEvent")]
public event EventHandler MouseDown
Event Type
| Type |
|---|
| System.EventHandler |
MouseEnter
Event. Raised when the mouse enters.
Declaration
[ElementEvent("RaiseMouseEnterEvent")]
public event EventHandler MouseEnter
Event Type
| Type |
|---|
| System.EventHandler |
MouseLeave
Event. Raised when the mouse leaves.
Declaration
[ElementEvent("RaiseMouseLeaveEvent")]
public event EventHandler MouseLeave
Event Type
| Type |
|---|
| System.EventHandler |
MouseMove
Event. Raised when the mouse moves.
Declaration
[ElementEvent("RaiseMouseMoveEvent")]
public event EventHandler MouseMove
Event Type
| Type |
|---|
| System.EventHandler |
Paint
Event. Raised before the element or its part is painted.
Declaration
public event ElementPaintEventHandler Paint
Event Type
| Type |
|---|
| ElementPaintEventHandler |
ParentChanged
Utility event. Raised when parent property change.
Declaration
public event ValueChangedEventHandler ParentChanged
Event Type
| Type |
|---|
| ValueChangedEventHandler |
QuietModeChanged
Delegate. Raised when quiet mode property is changed.
Declaration
public event EventHandler QuietModeChanged
Event Type
| Type |
|---|
| System.EventHandler |
RuntimeAttributeChanged
Event which is raised when run-time attribute has been changed.
Declaration
public event EventHandler RuntimeAttributeChanged
Event Type
| Type |
|---|
| System.EventHandler |
SizeCalculated
Event. Raised when the size of the element is calculated.
Declaration
public event EventHandler SizeCalculated
Event Type
| Type |
|---|
| System.EventHandler |
TabIndexChanged
Event. Raised when the TabIndex property value has been changed.
Declaration
[ElementEvent("RaiseTabIndexChangedEvent")]
public event EventHandler TabIndexChanged
Event Type
| Type |
|---|
| System.EventHandler |
UniqueIDChanged
Utility event. Raised when UniqueID property changes.
Declaration
public event ValueChangedEventHandler UniqueIDChanged
Event Type
| Type |
|---|
| ValueChangedEventHandler |