VisualCanvasKeyValueBlockLayer
ChartForgeX.Composition
Reusable key/value text block with measured label columns and wrapped value text.
Inheritance
- VisualCanvasLayer
- VisualCanvasKeyValueBlockLayer
Constructors
public VisualCanvasKeyValueBlockLayer(double x, double y, double width, double height, IEnumerable<VisualCanvasKeyValueItem> items) #Initializes a key/value text block layer.
Parameters
- x double
- The block X coordinate.
- y double
- The block Y coordinate.
- width double
- The block width.
- height double
- The initial block height.
- items System.Collections.Generic.IEnumerable<ChartForgeX.Composition.VisualCanvasKeyValueItem>
- The key/value rows.
Methods
public double MeasureHeight() #Measures the block height using the current text and wrapping settings and the default theme font family.
Returns
doublepublic double MeasureHeight(VisualTheme theme, ThemeMode mode = Light, VisualCanvasStyleOptions? style = null) #Measures the block height with the font family the block draws with on a canvas using theme.
Parameters
- theme ChartForgeX.Themes.VisualTheme
- mode ChartForgeX.ThemeMode = Light
- style ChartForgeX.Composition.VisualCanvasStyleOptions? = null
Returns
doublepublic double MeasureHeight(VisualCanvas canvas) #Measures using the exact shared theme, mode and local measurement settings of a canvas.
Parameters
- canvas ChartForgeX.Composition.VisualCanvas
Returns
doubleInherited Methods
Properties
public IReadOnlyList<VisualCanvasKeyValueItem> Items { get; } #Gets the key/value rows.
public double LabelFontSize { get; set; } #Gets or sets the label font size.
public double ValueFontSize { get; set; } #Gets or sets the value font size.
public double ColumnGap { get; set; } #Gets or sets the gap between label and value columns.
public double RowGap { get; set; } #Gets or sets the gap between rows.
public double? LabelWidth { get; set; } #Gets or sets an explicit label column width. When empty, the widest label is measured.
public double? ValueWrapWidth { get; set; } #Gets or sets an explicit value wrap width. When empty, the remaining block width is used.
public ChartColor? LabelColorOverride { get; set; } #Gets or sets an optional default label color override.
public ChartColor? ValueColorOverride { get; set; } #Gets or sets an optional default value color override.
public string FontFamilyName { get; set; } #Gets or sets the font family for this block. When empty, the canvas theme family is used by SVG and PNG output alike.
public bool LabelEmphasized { get; set; } #Gets or sets whether labels use the emphasized text treatment.
public bool ValueEmphasized { get; set; } #Gets or sets whether values use the emphasized text treatment.