MarkupLabel Class
Represents a label that is capable of formatting simple HTML tags.
public class MarkupLabel : UIControl, IUIControl, IUIElement, ILogicalTreeNode, IDisposable
- Implements:
- IUIControl IUIElement ILogicalTreeNode IDisposable
Constructors
MarkupLabel()
Initializes a new instance of the MarkupLabel
class.
public MarkupLabel()
Remarks
The default constructor initializes all fields to their default values.
Properties
BackColor
Gets or sets the background color for the control.
public override Color BackColor { get; set; }
Property Value
BackgroundImage
Gets or sets the background image displayed in the control.
public override Image BackgroundImage { get; set; }
Property Value
Font
Gets or sets the font of the text displayed by the control.
public override Font Font { get; set; }
Property Value
ForeColor
Gets or sets the foreground color for the control.
public override Color ForeColor { get; set; }
Property Value
MaxWidth
Gets or sets the maximum width of the element.
RootElement
Gets the MarkupLabelElement that is the root element.
public MarkupLabelElement RootElement { get; }
Property Value
- MarkupLabelElement:
The MarkupLabelElement that is the root element.
Text
Gets or sets the markup text to display in the label.
public override string Text { get; set; }
Property Value
- String:
The markup text to display in the label.
Methods
ArrangeOverride(Size)
Positions child elements and determines an arrange size.
protected override Size ArrangeOverride(Size finalSize)
Parameter | Type | Description |
---|---|---|
finalSize | Size | The final area within the parent that this element should use to arrange itself and its children. |
Returns
- Size:
The actual size used.
Remarks
Element authors should override this method, call Arrange(Rectangle) on each visible child element and position each child element. It is required that a parent element calls Arrange(Rectangle) on each child or they won't be rendered.
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.
Dispose(Boolean)
Releases the unmanaged resources used by the object and optionally releases the managed resources.
protected override void Dispose(bool disposing)
Parameter | Type | Description |
---|---|---|
disposing | Boolean |
|
Remarks
This method is called by the public Dispose
method and the Finalize
method.
Dispose
invokes this method with the disposing
parameter set to true
.
Finalize
invokes this method with disposing
set to false
.
GetPreferredSize()
Returns the preferred size of the control.
OnDownloadImage(MarkupLabelDownloadImageEventArgs)
Raises the DownloadImage
event.
protected virtual void OnDownloadImage(MarkupLabelDownloadImageEventArgs e)
Parameter | Type | Description |
---|---|---|
e | MarkupLabelDownloadImageEventArgs | An |
OnFontChanged(EventArgs)
Raises the FontChanged
event.
protected override sealed void OnFontChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnLinkClick(MarkupLabelLinkClickEventArgs)
Raises the LinkClick
event.
protected virtual void OnLinkClick(MarkupLabelLinkClickEventArgs e)
Parameter | Type | Description |
---|---|---|
e | MarkupLabelLinkClickEventArgs | An |
OnResize(EventArgs)
Raises the Resize
event.
protected override void OnResize(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
Events
DownloadImage
Occurs when an image needs to be downloaded for a MarkupLabelImageElement.
public event MarkupLabelDownloadImageEventHandler DownloadImage
Event Type
LinkClick
Occurs after a MarkupLabelAnchorElement is clicked.
Inherited Members
- UIControl.ILogicalTreeNode.FindAncestor(Type)
- UIControl.ILogicalTreeNode.GetCommonAncestor(ILogicalTreeNode)
- UIControl.ILogicalTreeNode.IsAncestorOf(ILogicalTreeNode)
- UIControl.ILogicalTreeNode.IsDescendantOf(ILogicalTreeNode)
- UIControl.IUIControl.AddPendingGraphicsInversion(Rectangle)
- UIControl.IUIControl.AddPendingScrollOperation(Rectangle, Orientation, Int32)
- UIControl.IUIControl.AddPendingScrollOperation(Rectangle, Int32, Int32)
- UIControl.IUIControl.AddToInvalidatedRegion(Rectangle)
- UIControl.IUIElement.GetDrawState()
- UIControl.IUIElement.HitTest(PointHitTestParameters)
- UIControl.IUIElement.HitTest(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, Boolean>)
- UIControl.IUIElement.HitTestRecursive(PointHitTestParameters)
- UIControl.IUIElement.HitTestRecursive(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, Boolean>)
- UIControl.IUIElement.NotifyChildDesiredSizeChanged()
- UIControl.IUIElement.NotifyMouseLeaveEvent()
- UIControl.AddPendingGraphicsInversion(Rectangle)
- UIControl.AddPendingScrollOperation(Rectangle, Orientation, Int32)
- UIControl.AddPendingScrollOperation(Rectangle, Int32, Int32)
- UIControl.AddToInvalidatedRegion()
- UIControl.AddToInvalidatedRegion(Rectangle)
- UIControl.Arrange(Rectangle)
- UIControl.ContainsLocation(Point)
- UIControl.GetCursor(Point)
- UIControl.Invalidate(InvalidationLevels, InvalidationTypes)
- UIControl.InvalidateArrange()
- UIControl.InvalidateMeasure()
- UIControl.Measure(Graphics, Size)
- UIControl.MeasureOverride(Graphics, Size)
- UIControl.OnClick(EventArgs)
- UIControl.OnDoubleClick(EventArgs)
- UIControl.OnHandleCreated(EventArgs)
- UIControl.OnLayout(LayoutEventArgs)
- UIControl.OnLocationChanged(EventArgs)
- UIControl.OnMouseDown(MouseEventArgs)
- UIControl.OnMouseEnter(EventArgs)
- UIControl.OnMouseHover(EventArgs)
- UIControl.OnMouseLeave(EventArgs)
- UIControl.OnMouseMove(MouseEventArgs)
- UIControl.OnMouseUp(MouseEventArgs)
- UIControl.OnMouseWheel(MouseEventArgs)
- UIControl.OnPaint(PaintEventArgs)
- UIControl.OnPaintBackground(PaintEventArgs)
- UIControl.OnParentChanged()
- UIControl.OnRender(PaintEventArgs)
- UIControl.OnRenderChildElements(PaintEventArgs)
- UIControl.OnRightToLeftChanged(EventArgs)
- UIControl.OnVisibleChanged(EventArgs)
- UIControl.Render(PaintEventArgs)
- UIControl.ResetDoubleBufferCanvas(Boolean)
- UIControl.ResumePainting()
- UIControl.SuspendPainting()
- UIControl.TransformToAncestor(IUIElement)
- UIControl.TransformToDescendant(IUIElement)
- UIControl.UpdateLayout()
- UIControl.IUIElement.CreateGraphics()
- UIControl.ILogicalTreeNode.Children
- UIControl.ILogicalTreeNode.Parent
- UIControl.IUIControl.MouseCaptureElement
- UIControl.IUIControl.Capture
- UIControl.IUIElement.Bounds
- UIControl.IUIElement.Size
- UIControl.IUIElement.Visibility
- UIControl.IUIElement.VisualOffset
- UIControl.ActualHeight
- UIControl.ActualWidth
- UIControl.CaptureMouseWhenPressed
- UIControl.ClipBounds
- UIControl.DesiredSize
- UIControl.IsArrangeValid
- UIControl.IsMeasureValid
- UIControl.IsPaintValid
- UIControl.IsRightToLeft
- UIControl.LastMouseUpButton
- UIControl.PaintingSuspended
- UIControl.UseControlGraphicsForMeasure
- UIControl.UseExtendedDoubleBuffering