Display components render static or derived content: text labels, vector artwork and the minimap overview used by large diagrams.

On this page

Label

Simple text display.

Label

A Material Design 3.0 text label component with typography support and optional SVG icons.

MemberKindDescription
string TextPropertyGets or sets the text displayed by the label.
LabelStyle StylePropertyGets or sets the Material Design 3.0 typography style.
SKTextAlign TextAlignPropertyGets or sets the text alignment.
float FontSizePropertyGets or sets the font size (for backward compatibility).
SKFontStyleWeight FontWeightPropertyGets the font weight based on the current typography style.
new SKColor TextColorPropertyGets or sets the text color (for backward compatibility).
string LeadingIconPropertyGets or sets the leading SVG icon path or URL.
string TrailingIconPropertyGets or sets the trailing SVG icon path or URL.
string ErrorMessagePropertyGets or sets the error message to display below the label.
string TitlePropertyGets or sets the title text to display above the label.
Label()MethodInitializes a new instance of the Label class.
Label(string text) : this()MethodInitializes a new instance of the Label class with specified text.
Label(string text, LabelStyle style) : this(text)MethodInitializes a new instance of the Label class with specified text and style.

SVG Image

Vector artwork rendered from SVG markup.

SvgImage

A component that displays SVG images with support for scaling and positioning.

MemberKindDescription
string SvgSourcePropertyGets or sets the SVG source. Can be a file path, embedded resource, or SVG content string. Supported formats: - File path: "C:\path\to\file.svg" or "relative\path\file.svg" - Embedded resource: "AssemblyName.ResourceName" (e.g., "Beep.Skia.svg.door.svg") - SVG content: Raw SVG XML string
SvgScaleMode ScaleModePropertyGets or sets the scaling mode for the SVG.
SKSize OriginalSizePropertyGets the original SVG size.
SvgImage()MethodInitializes a new instance of the SvgImage class.
void LoadEmbeddedResource(string resourceName)MethodLoads an embedded SVG resource from the current assembly. The name of the embedded resource.
void LoadEmbeddedResource(string assemblyName, string resourceName)MethodLoads an embedded SVG resource from the specified assembly. The name of the assembly containing the resource. The name of the embedded resource.
void LoadEmbeddedResource(Assembly assembly, string resourceName)MethodLoads an embedded SVG resource from the specified assembly. The assembly containing the resource. The name of the embedded resource.
SvgImage(string resourceName, bool isEmbedded) : this()MethodInitializes a new instance of the SvgImage class with an embedded resource from the current assembly. The name of the embedded resource. True if the resource is embedded; false if it's a file path.
SvgImage(string assemblyName, string resourceName) : this()MethodInitializes a new instance of the SvgImage class with an embedded resource from the specified assembly. The name of the assembly containing the resource. The name of the embedded resource.
SvgImage(string svgContent) : this()MethodInitializes a new instance of the SvgImage class with SVG content. The SVG content as a string.

Minimap

Scaled overview of the diagram with a viewport rectangle.

MinimapControl

Diagram minimap: a scaled overview of all components and connection lines with a viewport rectangle showing the currently visible world area (from pan/zoom). Intended to be added as a static overlay component.

MemberKindDescription
DrawingManager ManagerPropertyDrawing manager providing the diagram content and viewport.
float MinimapPaddingPropertyPadding inside the minimap frame.
bool ShowViewportPropertyDraws the viewport rectangle when true.
SKColor MinimapBackgroundPropertyGets or sets the minimap background.
SKColor ComponentFillPropertyGets or sets the component fill.
SKColor ComponentStrokePropertyGets or sets the component stroke.
SKColor ViewportStrokePropertyGets or sets the viewport stroke.
MinimapControl()MethodInitializes a new instance of the MinimapControl class.
SKRect CalculateWorldBounds()MethodWorld-space bounds of the diagram content (minimum 1x1).
float CalculateScale()MethodScale factor mapping world units to minimap pixels.
SKPoint MapWorldToMinimap(SKPoint world)MethodMaps a world-space point to canvas coordinates inside the minimap.
SKRect CalculateViewportWorldRect()MethodWorld-space rectangle currently visible, derived from pan/zoom and the bound canvas. Returns an empty rect when no canvas is attached.