Table of Contents

Struct Graphics.DrawLabelParams

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Contains parameters for the draw label method.

public struct Graphics.DrawLabelParams

Constructors

DrawLabelParams(string, Font, Color)

Initializes a new instance of the Graphics.DrawLabelParams struct.

DrawLabelParams(string, Font, Color, Color, Image?, RectD, HVAlignment?, int)

Initializes a new instance of the Graphics.DrawLabelParams struct with the specified initial values.

Fields

Alignment

Gets or sets alignment of the image and text block. Default is TopLeft.

BackgroundColor

Gets or sets background color of the text. If property value equals to Empty (default value), background will not be painted.

DebugId

Internal use only.

DrawDebugCorners

Gets or sets whether to draw debug corners around elements.

Flags

Gets or sets flags that can be used to customize label painting.

Font

Gets or sets font used to draw the text.

ForegroundColor

Gets or sets foreground color of the text.

Image

Gets or sets optional image which is shown near the text. Default is Null.

ImageHorizontalAlignment

Gets or sets horizontal alignment of the image.

ImageLabelDistance

Gets or sets distance between image and label. If Null, DefaultImageLabelDistance is used.

ImageVerticalAlignment

Gets or sets vertical alignment of the image.

IndexAccel

Gets or sets index of underlined mnemonic character.

IsVertical

Gets or sets a value which specifies whether image to text are aligned vertically or horizontally.

IsVerticalText

Gets or sets a value indicating whether the text should be rendered vertically.

LineDistance

Gets or sets distance between lines of text.

MinTextWidth

Represents the minimum text width as a coordinate value.

PrefixElements

Gets or sets array of elements to draw before the label text and image.

Rect

Gets or sets rectangle in which drawing is performed.

ResultBounds

Gets all elements bounding rectangle after drawing. This is filled even if Visible is False.

ResultRects

Gets element bounds after drawing was performed. This is filled with bounds only if Visible is True.

ResultSizes

Gets element sizes after drawing was performed. This is filled with sizes even if Visible is False.

SuffixElements

Gets or sets array of elements to draw after the label text and image.

Text

Gets or sets text to draw.

TextAndFontStyle

Gets or sets text with attributes to use instead of Text.

TextHorizontalAlignment

Gets or sets horizontal alignment of the text line within the text block.

Visible

Gets or sets whether painting is actually performed. This property may be useful when you need to calculate element sizes without painting.

Methods

GetImageAlignment()

Determines the image alignment based on the current orientation.

GetTextAlignment()

Determines the text alignment based on the current orientation.