MarkupLabelElement Class
Provides the base class for a MarkupLabel element.
public abstract class MarkupLabelElement : LogicalTreeNodeBase, IDisposable, ILogicalTreeNode
- Inheritance:
- object MarshalByRefObject DisposableObject LogicalTreeNodeBase object
- Derived:
- MarkupLabelAnchorElement MarkupLabelBodyElement MarkupLabelBoldElement MarkupLabelEmphasisElement MarkupLabelImageElement MarkupLabelItalicElement MarkupLabelLineBreakElement MarkupLabelSpanElement MarkupLabelStrongElement MarkupLabelTextElement MarkupLabelUnderlineElement
- Implements:
- IDisposable ILogicalTreeNode
Constructors
MarkupLabelElement(string)
Initializes a new instance of the MarkupLabelElement
class.
public MarkupLabelElement(string elementName)
Parameter | Type | Description |
---|---|---|
elementName | string | The name of the element represented by this class. |
Properties
Children
Gets the collection of child objects.
ClassName
Gets or sets the class name of the element.
CssData
Gets the MarkupLabelCssData specifying CSS data for the element.
public MarkupLabelCssData CssData { get; }
Property Value
- MarkupLabelCssData:
The MarkupLabelCssData specifying CSS data for the element.
DpiScaleFactor
Gets the DPI scale factor to be applied when rendering the element, where Width is applied to the x-axis, and Height is applied to the y-axis.
ElementName
Gets the name of the element represented by this class.
public string ElementName { get; }
Property Value
- string:
The name of the element represented by this class.
Id
Gets or sets the id of the element.
MarkupLabel
Gets the MarkupLabel that owns the element.
public virtual MarkupLabel MarkupLabel { get; }
Property Value
- MarkupLabel:
The MarkupLabel that owns the element.
Parent
Gets or sets the object that is parent to this object.
public MarkupLabelElement Parent { get; set; }
Property Value
- MarkupLabelElement:
The object that is parent to this object.
Remarks
The setter of this property is reserved for internal use only.
Style
Gets or sets the CSS style string for the element.
VerticalAlignment
Gets or sets a MarkupLabelElementVerticalAlignment indicating the vertical alignment.
public MarkupLabelElementVerticalAlignment VerticalAlignment { get; set; }
Property Value
- MarkupLabelElementVerticalAlignment:
A MarkupLabelElementVerticalAlignment indicating the vertical alignment.
Methods
CreateChildren()
Invoked when the collection of child elements is to be created.
protected override IList CreateChildren()
Returns
Remarks
By default no child collection is created.
CreateUIElement(IUIElement)
Creates the IUIElement tree from the element.
protected virtual void CreateUIElement(IUIElement parentUIElement)
Parameter | Type | Description |
---|---|---|
parentUIElement | IUIElement | The parent IUIElement. |
GetBackColor(UIElementDrawState)
Gets the background Color to use for drawing the element.
public virtual Color GetBackColor(UIElementDrawState drawState)
Parameter | Type | Description |
---|---|---|
drawState | UIElementDrawState | A UIElementDrawState indicating the draw state. |
Returns
GetDefaultCssData()
Gets the default MarkupLabelCssData for the element.
public virtual MarkupLabelCssData GetDefaultCssData()
Returns
- MarkupLabelCssData:
The default MarkupLabelCssData for the element.
GetFont()
Gets the Font to use for drawing text in the element.
GetFont(string, float, MarkupLabelFontWeight, MarkupLabelFontStyle, MarkupLabelTextDecoration, UIElementDrawState)
Gets the Font to use for drawing text in the element.
public virtual Font GetFont(string fontFamily, float fontSize, MarkupLabelFontWeight fontWeight, MarkupLabelFontStyle fontStyle, MarkupLabelTextDecoration textDecoration, UIElementDrawState drawState)
Parameter | Type | Description |
---|---|---|
fontFamily | string | The font family. |
fontSize | float | The font size. |
fontWeight | MarkupLabelFontWeight | A MarkupLabelFontWeight indicating the font weight. |
fontStyle | MarkupLabelFontStyle | A MarkupLabelFontStyle indicating the font style. |
textDecoration | MarkupLabelTextDecoration | A MarkupLabelTextDecoration indicating the text decoration. |
drawState | UIElementDrawState | A UIElementDrawState indicating the draw state. |
Returns
GetForeColor(UIElementDrawState)
Gets the foreground Color to use for drawing the element.
public virtual Color GetForeColor(UIElementDrawState drawState)
Parameter | Type | Description |
---|---|---|
drawState | UIElementDrawState | A UIElementDrawState indicating the draw state. |
Returns
ToString()
Returns a String
that represents the current Object
.
Inherited Members
- LogicalTreeNodeBase.OnParentChanged()
- DisposableObject.Dispose()
- DisposableObject.Dispose(bool)
- DisposableObject.VerifyNotDisposed()
- DisposableObject.IsDisposed
- DisposableObject.Disposed
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()