Skip to content
ChartForgeX
Class

BlockLayoutBlock

ChartForgeX.VisualBlocks

Namespace
ChartForgeX.VisualBlocks
Assembly
ChartForgeX
Modifiers
sealed
Attributes
Fluent

A deterministic grid-based block layout with optional directed edges.

Inheritance

Usage

Explore 74 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 42

Accepted by parameters 32

Constructors

public BlockLayoutBlock() #

Methods

public BlockLayoutBlock AddComposite(string id, string label = "", int columnSpan = 1, int? columns = null, string? parentId = null, bool autoColumns = false) #

Adds a composite without replacing or aggregating its source children. Null local columns inherits the parent grid.

Parameters

id string required
label string = "" optional
columnSpan int = 1 optional
columns int? = null optional
parentId string? = null optional
autoColumns bool = false optional
public BlockLayoutBlock AddEdge(string sourceId, string targetId, string label = "", bool directed = true) #

Adds an edge between two visible block items.

Parameters

sourceId string required
targetId string required
label string = "" optional
directed bool = true optional
AddItem 2 overloads
public BlockLayoutBlock AddItem(string id, string label, int columnSpan = 1, BlockLayoutShape shape = Rectangle) #

Adds a visible block item.

Parameters

id string required
label string required
columnSpan int = 1 optional
shape ChartForgeX.VisualBlocks.BlockLayoutShape = Rectangle optional
public BlockLayoutBlock AddItem(string id, string label, string parentId, int columnSpan = 1, BlockLayoutShape shape = Rectangle) #

Adds a visible item inside a named composite. Parent references may be declared later and are validated before rendering.

Parameters

id string required
label string required
parentId string required
columnSpan int = 1 optional
shape ChartForgeX.VisualBlocks.BlockLayoutShape = Rectangle optional
AddSpace 2 overloads
public BlockLayoutBlock AddSpace(int columnSpan = 1) #

Adds an invisible spacer that occupies one or more columns.

Parameters

columnSpan int = 1 optional
public BlockLayoutBlock AddSpace(string parentId, int columnSpan = 1) #

Adds a source-ordered invisible spacer inside a composite.

Parameters

parentId string required
columnSpan int = 1 optional
public static BlockLayoutBlock Create() #

Creates a block layout.

Properties

public IReadOnlyList<BlockLayoutItem> Items { get; } #

Gets block items in source/layout order.

public IReadOnlyList<BlockLayoutEdge> Edges { get; } #

Gets edges between visible block items.

public int Columns { get; set; } #

Gets or sets the number of layout columns.

public bool ShowEdges { get; set; } #

Gets or sets whether edges are rendered when present.

public override string AccessibleName { get; } #

Gets a concise accessibility label.

public bool AutoColumns { get; set; } #

Gets or sets whether direct children occupy one source-ordered row. Explicit Columns is retained for restoring fixed columns.

Extension Methods

public static BlockLayoutBlock Accessibility(BlockLayoutBlock blockLayoutBlock, Action<VisualAccessibility> configure) #

Configures VisualBlockOptions.Accessibility in place: Gets the text alternative, language, and decorative metadata used by static exports.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
configure System.Action<ChartForgeX.Accessibility.VisualAccessibility> required
Configures the value.

Returns

BlockLayoutBlock The same instance.
public static BlockLayoutBlock AutoColumns(BlockLayoutBlock blockLayoutBlock, bool value = true) #

Sets BlockLayoutBlock.AutoColumns: Gets or sets whether direct children occupy one source-ordered row. Explicit Columns is retained for restoring fixed columns.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ChartForgeX.VisualBlocks.BlockLayoutBlock { AutoColumns = value };    blockLayoutBlock.AutoColumns(value);
public static BlockLayoutBlock Columns(BlockLayoutBlock blockLayoutBlock, int value) #

Sets BlockLayoutBlock.Columns: Gets or sets the number of layout columns.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value int required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ChartForgeX.VisualBlocks.BlockLayoutBlock { Columns = value };    blockLayoutBlock.Columns(value);
public static BlockLayoutBlock HostOwnsFrame(BlockLayoutBlock blockLayoutBlock, bool value = true) #

Sets VisualBlockOptions.HostOwnsFrame: Gets or sets whether the host owns the frame, removing the surface and outer padding.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                         // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.HostOwnsFrame = value;    blockLayoutBlock.HostOwnsFrame(value);
public static BlockLayoutBlock Options(BlockLayoutBlock blockLayoutBlock, Action<VisualBlockOptions> configure) #

Configures VisualBlock<BlockLayoutBlock>.Options in place: Gets shared rendering options.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
configure System.Action<ChartForgeX.VisualBlocks.VisualBlockOptions> required
Configures the value.

Returns

BlockLayoutBlock The same instance.
public static BlockLayoutBlock Padding(BlockLayoutBlock blockLayoutBlock, ChartPadding value) #

Sets VisualBlockOptions.Padding: Gets or sets the inner content padding.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value ChartForgeX.Primitives.ChartPadding required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                   // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.Padding = value;    blockLayoutBlock.Padding(value);
public static BlockLayoutBlock RasterScale(BlockLayoutBlock blockLayoutBlock, int value) #

Sets VisualBlockOptions.RasterScale: Gets or sets the output pixel multiplier used by PNG exports.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value int required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                       // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.RasterScale = value;    blockLayoutBlock.RasterScale(value);
public static BlockLayoutBlock ShowCard(BlockLayoutBlock blockLayoutBlock, bool value = true) #

Sets VisualBlockOptions.ShowCard: Gets or sets whether the outer card surface should be rendered.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                    // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.ShowCard = value;    blockLayoutBlock.ShowCard(value);
public static BlockLayoutBlock ShowEdges(BlockLayoutBlock blockLayoutBlock, bool value = true) #

Sets BlockLayoutBlock.ShowEdges: Gets or sets whether edges are rendered when present.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.VisualBlocks.BlockLayoutBlock { ShowEdges = value };    blockLayoutBlock.ShowEdges(value);
public static BlockLayoutBlock Size(BlockLayoutBlock blockLayoutBlock, ChartSize value) #

Sets VisualBlockOptions.Size: Gets or sets the rendered block size in pixels.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value ChartForgeX.Primitives.ChartSize required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.Size = value;    blockLayoutBlock.Size(value);
public static BlockLayoutBlock Subtitle(BlockLayoutBlock blockLayoutBlock, string value) #

Sets VisualBlock<BlockLayoutBlock>.Subtitle: Gets or sets the block subtitle.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value string required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                  // C# fluent
new global::ChartForgeX.VisualBlocks.BlockLayoutBlock { Subtitle = value };    blockLayoutBlock.Subtitle(value);
public static BlockLayoutBlock SvgColorVariables(BlockLayoutBlock blockLayoutBlock, SvgColorVariables? value) #

Sets VisualBlockOptions.SvgColorVariables: Gets or sets the CSS custom properties SVG output writes for theme colours, matched by colour value (see SvgColorVariables.Apply), for example SvgColorVariables.SharedRoles of this theme and mode. Null (the default) writes literal colours; PNG output always does.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value ChartForgeX.Themes.SvgColorVariables? required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                             // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.SvgColorVariables = value;    blockLayoutBlock.SvgColorVariables(value);
public static BlockLayoutBlock Theme(BlockLayoutBlock blockLayoutBlock, VisualTheme value) #

Sets VisualBlockOptions.Theme: Gets or sets the visual theme used by renderers.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value ChartForgeX.Themes.VisualTheme required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                 // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.Theme = value;    blockLayoutBlock.Theme(value);
public static BlockLayoutBlock ThemeMode(BlockLayoutBlock blockLayoutBlock, ThemeMode value) #

Sets VisualBlockOptions.ThemeMode: Gets or sets the explicit mode of the shared theme.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value ChartForgeX.ThemeMode required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                     // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.ThemeMode = value;    blockLayoutBlock.ThemeMode(value);
public static BlockLayoutBlock Title(BlockLayoutBlock blockLayoutBlock, string value) #

Sets VisualBlock<BlockLayoutBlock>.Title: Gets or sets the block title.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value string required
The value.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ChartForgeX.VisualBlocks.BlockLayoutBlock { Title = value };    blockLayoutBlock.Title(value);
public static BlockLayoutBlock TransparentBackground(BlockLayoutBlock blockLayoutBlock, bool value = true) #

Sets VisualBlockOptions.TransparentBackground: Gets or sets whether the full background should stay transparent.

Parameters

blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

BlockLayoutBlock The same instance.

Examples

// C# initializer or property                                                                                                                                 // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.TransparentBackground = value;    blockLayoutBlock.TransparentBackground(value);