BlockLayoutBlock
ChartForgeX.VisualBlocks
A deterministic grid-based block layout with optional directed edges.
Inheritance
- VisualBlock<BlockLayoutBlock>
- BlockLayoutBlock
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
- Extension method MermaidBlockDocument.ToBlockLayoutBlock
- Method MermaidBlockRendering.ToBlockLayoutBlock
- Extension method BlockLayoutBlock.Accessibility
- Extension method BlockLayoutBlock.AutoColumns
- Extension method BlockLayoutBlock.Columns
- Extension method BlockLayoutBlock.HostOwnsFrame
- Extension method BlockLayoutBlock.Options
- Extension method BlockLayoutBlock.Padding
- Extension method BlockLayoutBlock.RasterScale
- Extension method BlockLayoutBlock.ShowCard
- Extension method BlockLayoutBlock.ShowEdges
- Extension method BlockLayoutBlock.Size
- Extension method BlockLayoutBlock.Subtitle
- Extension method BlockLayoutBlock.SvgColorVariables
- Extension method BlockLayoutBlock.Theme
- Extension method BlockLayoutBlock.ThemeMode
- Extension method BlockLayoutBlock.Title
- Extension method BlockLayoutBlock.TransparentBackground
- Method BlockLayoutBlock.AddComposite
- Method BlockLayoutBlock.AddEdge
- Method BlockLayoutBlock.AddItem
- Method BlockLayoutBlock.AddSpace
- Method BlockLayoutBlock.Create
- Method BlockLayoutBlock.Padding
- Method BlockLayoutBlock.Size
- Method BlockLayoutBlock.Theme
- Method BlockLayoutBlockFluent.Accessibility
- Method BlockLayoutBlockFluent.AutoColumns
- Method BlockLayoutBlockFluent.Columns
- Method BlockLayoutBlockFluent.HostOwnsFrame
- Method BlockLayoutBlockFluent.Options
- Method BlockLayoutBlockFluent.Padding
- Method BlockLayoutBlockFluent.RasterScale
- Method BlockLayoutBlockFluent.ShowCard
- Method BlockLayoutBlockFluent.ShowEdges
- Method BlockLayoutBlockFluent.Size
- Method BlockLayoutBlockFluent.Subtitle
- Method BlockLayoutBlockFluent.SvgColorVariables
- Method BlockLayoutBlockFluent.Theme
- Method BlockLayoutBlockFluent.ThemeMode
- Method BlockLayoutBlockFluent.Title
- Method BlockLayoutBlockFluent.TransparentBackground
Accepted by parameters 32
- Extension method BlockLayoutBlock.Accessibility
- Extension method BlockLayoutBlock.AutoColumns
- Extension method BlockLayoutBlock.Columns
- Extension method BlockLayoutBlock.HostOwnsFrame
- Extension method BlockLayoutBlock.Options
- Extension method BlockLayoutBlock.Padding
- Extension method BlockLayoutBlock.RasterScale
- Extension method BlockLayoutBlock.ShowCard
- Extension method BlockLayoutBlock.ShowEdges
- Extension method BlockLayoutBlock.Size
- Extension method BlockLayoutBlock.Subtitle
- Extension method BlockLayoutBlock.SvgColorVariables
- Extension method BlockLayoutBlock.Theme
- Extension method BlockLayoutBlock.ThemeMode
- Extension method BlockLayoutBlock.Title
- Extension method BlockLayoutBlock.TransparentBackground
- Method BlockLayoutBlockFluent.Accessibility
- Method BlockLayoutBlockFluent.AutoColumns
- Method BlockLayoutBlockFluent.Columns
- Method BlockLayoutBlockFluent.HostOwnsFrame
- Method BlockLayoutBlockFluent.Options
- Method BlockLayoutBlockFluent.Padding
- Method BlockLayoutBlockFluent.RasterScale
- Method BlockLayoutBlockFluent.ShowCard
- Method BlockLayoutBlockFluent.ShowEdges
- Method BlockLayoutBlockFluent.Size
- Method BlockLayoutBlockFluent.Subtitle
- Method BlockLayoutBlockFluent.SvgColorVariables
- Method BlockLayoutBlockFluent.Theme
- Method BlockLayoutBlockFluent.ThemeMode
- Method BlockLayoutBlockFluent.Title
- Method BlockLayoutBlockFluent.TransparentBackground
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
- label string = ""
- columnSpan int = 1
- columns int? = null
- parentId string? = null
- autoColumns bool = false
Returns
BlockLayoutBlockpublic BlockLayoutBlock AddEdge(string sourceId, string targetId, string label = "", bool directed = true) #Adds an edge between two visible block items.
Parameters
- sourceId string
- targetId string
- label string = ""
- directed bool = true
Returns
BlockLayoutBlockpublic BlockLayoutBlock AddItem(string id, string label, int columnSpan = 1, BlockLayoutShape shape = Rectangle) #Adds a visible block item.
Parameters
- id string
- label string
- columnSpan int = 1
- shape ChartForgeX.VisualBlocks.BlockLayoutShape = Rectangle
Returns
BlockLayoutBlockpublic 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
- label string
- parentId string
- columnSpan int = 1
- shape ChartForgeX.VisualBlocks.BlockLayoutShape = Rectangle
Returns
BlockLayoutBlockpublic BlockLayoutBlock AddSpace(int columnSpan = 1) #Adds an invisible spacer that occupies one or more columns.
Parameters
- columnSpan int = 1
Returns
BlockLayoutBlockpublic BlockLayoutBlock AddSpace(string parentId, int columnSpan = 1) #Adds a source-ordered invisible spacer inside a composite.
Parameters
- parentId string
- columnSpan int = 1
Returns
BlockLayoutBlockInherited Methods
public BlockLayoutBlock Padding(double padding) #Parameters
- padding double
Returns
BlockLayoutBlockpublic BlockLayoutBlock Padding(double left, double top, double right, double bottom) #Parameters
- left double
- top double
- right double
- bottom double
Returns
BlockLayoutBlockpublic virtual RgbaImage RenderRgba() #Returns
RgbaImagepublic virtual string RenderSvg(string idScope) #Parameters
- idScope string
Returns
stringpublic BlockLayoutBlock Size(int width, int height) #Parameters
- width int
- height int
Returns
BlockLayoutBlockpublic BlockLayoutBlock Theme(Action<VisualThemeBuilder> configure) #Parameters
- configure Action<VisualThemeBuilder>
Returns
BlockLayoutBlockProperties
public IReadOnlyList<BlockLayoutItem> Items { get; } #Gets block items in source/layout order.
public IReadOnlyList<BlockLayoutEdge> Edges { get; } #Gets edges between visible block items.
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.
Inherited Properties
public string Title { get; set; } #public string Subtitle { get; set; } #public VisualBlockOptions Options { get; } #FluentInlineExtension 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
- The instance.
- configure System.Action<ChartForgeX.Accessibility.VisualAccessibility>
- Configures the value.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value int
- The value.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- configure System.Action<ChartForgeX.VisualBlocks.VisualBlockOptions>
- Configures the value.
public static BlockLayoutBlock Padding(BlockLayoutBlock blockLayoutBlock, ChartPadding value) #Sets VisualBlockOptions.Padding: Gets or sets the inner content padding.
Parameters
- blockLayoutBlock ChartForgeX.VisualBlocks.BlockLayoutBlock
- The instance.
- value ChartForgeX.Primitives.ChartPadding
- The value.
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
- The instance.
- value int
- The value.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value ChartForgeX.Primitives.ChartSize
- The value.
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
- The instance.
- value string
- The value.
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
- The instance.
- value ChartForgeX.Themes.SvgColorVariables?
- The value.
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
- The instance.
- value ChartForgeX.Themes.VisualTheme
- The value.
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
- The instance.
- value ChartForgeX.ThemeMode
- The value.
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
- The instance.
- value string
- The value.
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
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.BlockLayoutBlock>)blockLayoutBlock).Options.TransparentBackground = value; blockLayoutBlock.TransparentBackground(value);