Display Components
Labels, SVG images and the minimap overview control
Display components render static or derived content: text labels, vector artwork and the minimap overview used by large diagrams.
Label
Simple text display.
Label
A Material Design 3.0 text label component with typography support and optional SVG icons.
| Member | Kind | Description |
|---|---|---|
string Text | Property | Gets or sets the text displayed by the label. |
LabelStyle Style | Property | Gets or sets the Material Design 3.0 typography style. |
SKTextAlign TextAlign | Property | Gets or sets the text alignment. |
float FontSize | Property | Gets or sets the font size (for backward compatibility). |
SKFontStyleWeight FontWeight | Property | Gets the font weight based on the current typography style. |
new SKColor TextColor | Property | Gets or sets the text color (for backward compatibility). |
string LeadingIcon | Property | Gets or sets the leading SVG icon path or URL. |
string TrailingIcon | Property | Gets or sets the trailing SVG icon path or URL. |
string ErrorMessage | Property | Gets or sets the error message to display below the label. |
string Title | Property | Gets or sets the title text to display above the label. |
Label() | Method | Initializes a new instance of the Label class. |
Label(string text) : this() | Method | Initializes a new instance of the Label class with specified text. |
Label(string text, LabelStyle style) : this(text) | Method | Initializes 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.
| Member | Kind | Description |
|---|---|---|
string SvgSource | Property | Gets 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 ScaleMode | Property | Gets or sets the scaling mode for the SVG. |
SKSize OriginalSize | Property | Gets the original SVG size. |
SvgImage() | Method | Initializes a new instance of the SvgImage class. |
void LoadEmbeddedResource(string resourceName) | Method | Loads an embedded SVG resource from the current assembly. The name of the embedded resource. |
void LoadEmbeddedResource(string assemblyName, string resourceName) | Method | Loads 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) | Method | Loads 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() | Method | Initializes 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() | Method | Initializes 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() | Method | Initializes 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.
| Member | Kind | Description |
|---|---|---|
DrawingManager Manager | Property | Drawing manager providing the diagram content and viewport. |
float MinimapPadding | Property | Padding inside the minimap frame. |
bool ShowViewport | Property | Draws the viewport rectangle when true. |
SKColor MinimapBackground | Property | Gets or sets the minimap background. |
SKColor ComponentFill | Property | Gets or sets the component fill. |
SKColor ComponentStroke | Property | Gets or sets the component stroke. |
SKColor ViewportStroke | Property | Gets or sets the viewport stroke. |
MinimapControl() | Method | Initializes a new instance of the MinimapControl class. |
SKRect CalculateWorldBounds() | Method | World-space bounds of the diagram content (minimum 1x1). |
float CalculateScale() | Method | Scale factor mapping world units to minimap pixels. |
SKPoint MapWorldToMinimap(SKPoint world) | Method | Maps a world-space point to canvas coordinates inside the minimap. |
SKRect CalculateViewportWorldRect() | Method | World-space rectangle currently visible, derived from pan/zoom and the bound canvas. Returns an empty rect when no canvas is attached. |