• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • MewExtendedToolkit
      • AboutBox
      • AboutBoxExtensions
      • InputBox
      • ObservableValueExtensions
      • SharpAppProperties
      • TransformBox
      • TransformBoxExtensions
      • Wizard
      • WizardExtensions
      • WizardPage
      • WizardPageExtensions
    • MewExtendedToolkit.Html
      • ControlExtensions
      • HtmlContainer
      • HtmlControl
      • HtmlLabel
      • HtmlPanel

    Class HtmlLabel

    Provides HTML rendering using the text property.
    MewUI 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.

    Inheritance
    object
    MewObject
    Element
    UIElement
    FrameworkElement
    TextElement
    Control
    HtmlControl
    HtmlLabel
    Implements
    IDisposable
    IVisualTreeHost
    Inherited Members
    HtmlControl._htmlContainer
    HtmlControl._baseCssData
    HtmlControl._lastScrollOffset
    HtmlControl.AvoidImagesLateLoadingProperty
    HtmlControl.IsSelectionEnabledProperty
    HtmlControl.IsContextMenuEnabledProperty
    HtmlControl.BaseStylesheetProperty
    HtmlControl.TextProperty
    HtmlControl.TextPropertyChanged(string)
    HtmlControl.LoadComplete
    HtmlControl.LinkClicked
    HtmlControl.RenderError
    HtmlControl.StylesheetLoad
    HtmlControl.ImageLoad
    HtmlControl.AvoidImagesLateLoading
    HtmlControl.IsSelectionEnabled
    HtmlControl.IsContextMenuEnabled
    HtmlControl.BaseStylesheet
    HtmlControl.Text
    HtmlControl.SelectedText
    HtmlControl.SelectedHtml
    HtmlControl.GetHtml()
    HtmlControl.GetElementRectangle(string)
    HtmlControl.ClearSelection()
    HtmlControl.OnRender(IGraphicsContext)
    HtmlControl._mouseMovePoint
    HtmlControl.OnMouseMove(MouseEventArgs)
    HtmlControl.OnMouseLeave()
    HtmlControl.OnMouseDown(MouseEventArgs)
    HtmlControl.OnMouseUp(MouseEventArgs)
    HtmlControl.OnMouseDoubleClick(MouseEventArgs)
    HtmlControl.OnKeyDown(KeyEventArgs)
    HtmlControl.OnLoadComplete(EventArgs)
    HtmlControl.OnLinkClicked(HtmlLinkClickedEventArgs)
    HtmlControl.OnRenderError(HtmlRenderErrorEventArgs)
    HtmlControl.OnStylesheetLoad(HtmlStylesheetLoadEventArgs)
    HtmlControl.OnImageLoad(HtmlImageLoadEventArgs)
    HtmlControl.OnRefresh(HtmlRefreshEventArgs)
    HtmlControl.HtmlWidth(Size)
    HtmlControl.HtmlHeight(Size)
    HtmlControl.InvokeMouseMove()
    Control.BackgroundProperty
    Control.BorderBrushProperty
    Control.TemplateProperty
    Control.CornerRadiusProperty
    Control.BorderThicknessProperty
    Control.PaddingProperty
    Control.IsPressedProperty
    Control.HasValidationErrorProperty
    Control.ValidationErrorsProperty
    Control.SetPressed(bool)
    Control.ComputeVisualState()
    Control.OnVisualStateChanged(Control.VisualState, Control.VisualState)
    Control.EnsureStyleResolved()
    Control.ApplyTemplate()
    Control.OnApplyTemplate()
    Control.GetTemplateChild<T>(string)
    Control.MeasureContent(Size)
    Control.ArrangeContent(Rect)
    Control.RenderSubtree(IGraphicsContext)
    Control.ResolveVisualState(bool)
    Control.OnThemeChanged(Theme, Theme)
    Control.OnVisualRootChanged(Element, Element)
    Control.OnFontCacheInvalidated(MewProperty)
    Control.GetTextRunStyle()
    Control.MeasureEngineText(ReadOnlySpan<char>, double, TextWrapping, bool)
    Control.DrawEngineText(IGraphicsContext, ReadOnlySpan<char>, Rect, Color, TextAlignment, TextAlignment, TextWrapping, TextTrimming, object, bool)
    Control.OnDpiChanged(uint, uint)
    Control.PickAccentBorder(Theme, Color, in Control.VisualState, double)
    Control.PickButtonBackground(in Control.VisualState, Color?)
    Control.PickControlBackground(in Control.VisualState, Color?)
    Control.PickControlBackground(in Control.VisualState, Color)
    Control.GetBorderVisualInset()
    Control.DrawBackgroundAndBorder(IGraphicsContext, Rect, Color, Color, double, double)
    Control.DrawBackgroundAndBorder(IGraphicsContext, Rect, Color, Color, Thickness, CornerRadius)
    Control.Background
    Control.BorderBrush
    Control.CornerRadius
    Control.BorderThickness
    Control.Padding
    Control.ContentBounds
    Control.CurrentVisualState
    Control.IsPressed
    Control.HasValidationError
    Control.ValidationErrors
    Control.StyleName
    Control.Template
    TextElement.ForegroundProperty
    TextElement.FontFamilyProperty
    TextElement.FontSizeProperty
    TextElement.FontWeightProperty
    TextElement.FontStyleProperty
    TextElement.Foreground
    TextElement.FontFamily
    TextElement.FontSize
    TextElement.FontWeight
    TextElement.FontStyle
    FrameworkElement.ThemeProperty
    FrameworkElement.WidthProperty
    FrameworkElement.HeightProperty
    FrameworkElement.MinWidthProperty
    FrameworkElement.MinHeightProperty
    FrameworkElement.MaxWidthProperty
    FrameworkElement.MaxHeightProperty
    FrameworkElement.MarginProperty
    FrameworkElement.HorizontalAlignmentProperty
    FrameworkElement.VerticalAlignmentProperty
    FrameworkElement.TagProperty
    FrameworkElement.ToolTipProperty
    FrameworkElement.ContextMenuProperty
    FrameworkElement.OnMouseEnter()
    FrameworkElement.ResolveToolTipContent()
    FrameworkElement.GetDpi()
    FrameworkElement.Dispose()
    FrameworkElement.OnDispose()
    FrameworkElement.GetSnappedBorderBounds(Rect)
    FrameworkElement.GetGraphicsFactory()
    FrameworkElement.OnSizeChanged(SizeChangedEventArgs)
    FrameworkElement.ArrangeCore(Rect)
    FrameworkElement.GetArrangedBounds(Rect)
    FrameworkElement.ArrangeOverride(Size)
    FrameworkElement.StyleSheet
    FrameworkElement.ToolTip
    FrameworkElement.ContextMenu
    FrameworkElement.Width
    FrameworkElement.Height
    FrameworkElement.MinWidth
    FrameworkElement.MinHeight
    FrameworkElement.MaxWidth
    FrameworkElement.MaxHeight
    FrameworkElement.Margin
    FrameworkElement.HorizontalAlignment
    FrameworkElement.VerticalAlignment
    FrameworkElement.Tag
    FrameworkElement.ActualWidth
    FrameworkElement.ActualHeight
    FrameworkElement.Theme
    FrameworkElement.SizeChanged
    UIElement.CacheModeProperty
    UIElement.IsVisibleProperty
    UIElement.IsEnabledProperty
    UIElement.IsEffectivelyEnabledProperty
    UIElement.IsFocusedProperty
    UIElement.IsFocusWithinProperty
    UIElement.IsMouseOverProperty
    UIElement.IsMouseCapturedProperty
    UIElement.OpacityProperty
    UIElement.IsHitTestVisibleProperty
    UIElement.TabIndexProperty
    UIElement.IsTabStopProperty
    UIElement.FocusableProperty
    UIElement.SkipViewportCullProperty
    UIElement.CursorProperty
    UIElement.AllowDropProperty
    UIElement.CanDragProperty
    UIElement.InvalidateVisual()
    UIElement.OnParentChanged()
    UIElement.OnMewPropertyChanged(MewProperty)
    UIElement.MeasureCore(Size)
    UIElement.Render(IGraphicsContext)
    UIElement.InvalidateVisualState()
    UIElement.HitTest(Point)
    UIElement.OnHitTest(Point)
    UIElement.Focus()
    UIElement.PointToScreen(Point)
    UIElement.PointFromScreen(Point)
    UIElement.RectToScreen(Rect)
    UIElement.RectFromScreen(Rect)
    UIElement.ComputeIsEnabledSuggestion()
    UIElement.OnGotFocus()
    UIElement.OnLostFocus()
    UIElement.OnMouseWheel(MouseWheelEventArgs)
    UIElement.OnKeyUp(KeyEventArgs)
    UIElement.OnVisibilityChanged()
    UIElement.OnEnabledChanged()
    UIElement.OnDragEnter(DragEventArgs)
    UIElement.OnDragOver(DragEventArgs)
    UIElement.OnDragLeave(DragEventArgs)
    UIElement.OnDrop(DragEventArgs)
    UIElement.OnDragStarting(DragStartingEventArgs)
    UIElement.OnDragCompleted(DragCompletedEventArgs)
    UIElement.BeginDrag(IDataObject, DragDropEffects, DragPreviewContent)
    UIElement.CacheMode
    UIElement.SkipViewportCull
    UIElement.IsVisible
    UIElement.IsEnabled
    UIElement.IsEffectivelyEnabled
    UIElement.Opacity
    UIElement.IsHitTestVisible
    UIElement.TabIndex
    UIElement.IsTabStop
    UIElement.Cursor
    UIElement.IsFocused
    UIElement.IsFocusWithin
    UIElement.IsMouseOver
    UIElement.IsMouseCaptured
    UIElement.Focusable
    UIElement.AllowDrop
    UIElement.CanDrag
    UIElement.Transitions
    UIElement.Triggers
    UIElement.GotFocus
    UIElement.LostFocus
    UIElement.MouseEnter
    UIElement.MouseLeave
    UIElement.MouseDown
    UIElement.MouseDoubleClick
    UIElement.MouseUp
    UIElement.MouseMove
    UIElement.MouseWheel
    UIElement.KeyDown
    UIElement.KeyUp
    UIElement.DragEnter
    UIElement.DragOver
    UIElement.DragLeave
    UIElement.Drop
    UIElement.DragStarting
    UIElement.DragCompleted
    Element.Set<T>(ref T, T)
    Element.SetDouble(ref double, double)
    Element.AttachChild(Element)
    Element.DetachChild(Element)
    Element.AttachLogicalChild(Element)
    Element.DetachLogicalChild(Element)
    Element.OnLogicalChildTaken(Element)
    Element.ValidateLogicalChild(Element, bool)
    Element.ChangeLogicalChild(Element, Element)
    Element.FindLogicalRoot()
    Element.OnLogicalParentChanged()
    Element.OnLogicalRootChanged(Element, Element)
    Element.Measure(Size)
    Element.Arrange(Rect)
    Element.InvalidateMeasure()
    Element.InvalidateArrange()
    Element.InvalidateArrangeForCurrentLayoutPass()
    Element.FindVisualRoot()
    Element.IsAncestorOf(Element)
    Element.IsDescendantOf(Element)
    Element.TransformToAncestor(Element)
    Element.TransformToDescendant(Element)
    Element.TransformToVisual(Element)
    Element.TranslatePoint(Point, Element)
    Element.TranslateRect(Rect, Element)
    Element.ResolveInheritedValue<T>(MewProperty<T>)
    Element.Commands
    Element.InputMap
    Element.DesiredSize
    Element.RenderSize
    Element.Parent
    Element.LogicalParent
    Element.IsMeasureDirty
    Element.IsArrangeDirty
    MewObject.OnValueSourceChanged(MewProperty)
    MewObject.GetValue<T>(MewProperty<T>)
    MewObject.SetValue<T>(MewProperty<T>, T)
    MewObject.SetCurrentValue<T>(MewProperty<T>, T)
    MewObject.CommitTargetValue<T>(MewProperty<T>, T)
    MewObject.ClearLocalValue<T>(MewProperty<T>)
    MewObject.SetValue<T>(MewPropertyKey<T>, T)
    MewObject.CoerceValue<T>(MewProperty<T>)
    MewObject.SetBinding<T>(MewProperty<T>, ObservableValue<T>, BindingMode?)
    MewObject.SetBinding<TProp, TSource>(MewProperty<TProp>, ObservableValue<TSource>, Func<TSource, TProp>, Func<TProp, TSource>, BindingMode?)
    MewObject.SetBinding<TRoot, T>(MewProperty<T>, TRoot, BindingPath<TRoot, T>, BindingMode?, T)
    MewObject.SetBinding<TProp, TRoot, TSource>(MewProperty<TProp>, TRoot, BindingPath<TRoot, TSource>, Func<TSource, TProp>, Func<TProp, TSource>, BindingMode?, TProp)
    MewObject.SetBinding<TSource, T>(MewProperty<T>, TSource, Func<TSource, T>, Action<TSource, T>, BindingMode?, string)
    MewObject.SetBinding<TProp, TSource, TValue>(MewProperty<TProp>, TSource, Func<TSource, TValue>, Func<TValue, TProp>, Action<TSource, TValue>, Func<TProp, TValue>, BindingMode?, string)
    MewObject.SetBinding<TSource, T>(MewProperty<T>, TSource, Func<TSource, ObservableValue<T>>, BindingMode?)
    MewObject.ClearBinding<T>(MewProperty<T>)
    MewObject.SetBinding<T>(MewProperty<T>, MewObject, MewProperty<T>)
    MewObject.SetBinding<TProp, TSource>(MewProperty<TProp>, MewObject, MewProperty<TSource>, Func<TSource, TProp>, Func<TProp, TSource>, BindingMode?)
    MewObject.DisposePropertyBindings()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: MewExtendedToolkit.Html
    Assembly: MewExtendedToolkit.Html.dll
    Syntax
    public class HtmlLabel : HtmlControl, IDisposable, IVisualTreeHost
    Remarks

    See HtmlControl for more info.

    Fields

    | Edit this page View Source

    AutoSizeHeightOnlyProperty

    Declaration
    public static readonly MewProperty<bool> AutoSizeHeightOnlyProperty
    Field Value
    Type Description
    MewProperty<bool>
    | Edit this page View Source

    AutoSizeProperty

    Declaration
    public static readonly MewProperty<bool> AutoSizeProperty
    Field Value
    Type Description
    MewProperty<bool>

    Properties

    | Edit this page View Source

    AutoSize

    Automatically sets the size of the label by content size

    Declaration
    public bool AutoSize { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    AutoSizeHeightOnly

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

    Declaration
    public virtual bool AutoSizeHeightOnly { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    MeasureOverride(Size)

    Perform the layout of the html in the control.

    Declaration
    protected override Size MeasureOverride(Size constraint)
    Parameters
    Type Name Description
    Size constraint
    Returns
    Type Description
    Size
    Overrides
    Aprillz.MewUI.Controls.Control.MeasureOverride(Aprillz.MewUI.Size)

    Implements

    IDisposable
    Aprillz.MewUI.IVisualTreeHost

    Extension Methods

    ControlExtensions.LoadRtfFile(HtmlControl, Stream)
    ControlExtensions.LoadRtfFile(HtmlControl, string)
    ControlExtensions.LoadRtfText(HtmlControl, string)
    ControlExtensions.Text(HtmlControl, string)
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2026 Jérémy Ansel