Table of Contents

Class HtmlLabel

Namespace
TheArtOfDev.HtmlRenderer.WPF
Assembly
StockSharp.Xaml.dll

Provides HTML rendering using the text property.
WPF control that will render html content in it's client rectangle.
Using AutoSize and AutoSizeHeightOnly client can control how the html content effects the size of the label. Either case scrollbars are never shown and html content outside of client bounds will be clipped. MaxWidth/MaxHeight and MinWidth/MinHeight with AutoSize can limit the max/min size of the control
The control will handle mouse and keyboard events on it to support html text selection, copy-paste and mouse clicks.

public class HtmlLabel : HtmlControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient
Inheritance
HtmlLabel
Implements
Derived
Inherited Members
Extension Methods

Remarks

See HtmlControl for more info.

Constructors

HtmlLabel()

public HtmlLabel()

Fields

AutoSizeHeightOnlyProperty

Dependency property for AutoSizeHeightOnly.

public static readonly DependencyProperty AutoSizeHeightOnlyProperty

Field Value

DependencyProperty

AutoSizeProperty

Dependency property for AutoSize.

public static readonly DependencyProperty AutoSizeProperty

Field Value

DependencyProperty

Properties

AutoSize

Automatically sets the size of the label by content size

public bool AutoSize { get; set; }

Property Value

bool

AutoSizeHeightOnly

Automatically sets the height of the label by content height (width is not effected).

public virtual bool AutoSizeHeightOnly { get; set; }

Property Value

bool

Methods

MeasureOverride(Size)

Perform the layout of the html in the control.

protected override Size MeasureOverride(Size constraint)

Parameters

constraint Size

Returns

Size