Shared rendering and geometry logic for floating drawings (charts, images) on a worksheet. Provides the outer container, frozen-pane splitting, selection chrome, and 8-direction resize handles; subclasses contribute only the inner content (e.g. SVG chart, img element).
Object
ComponentBase
IComponent
IHandleEvent
IHandleAfterRender
ComponentBase.OnInitialized
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.OnAfterRenderAsync
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.SetParametersAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor.Spreadsheet
Assembly: Radzen.Blazor.dll
public abstract class DrawingOverlayBase<TDrawing> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender| Name | Description |
|---|---|
| TDrawing | The drawing model type (e.g. TYPEREF:Radzen.Documents.Spreadsheet.SheetChartSheetChart/TYPEREF or TYPEREF:Radzen.Documents.Spreadsheet.SheetImageSheetImage/TYPEREF). |
Shared rendering and geometry logic for floating drawings (charts, images) on a worksheet. Provides the outer container, frozen-pane splitting, selection chrome, and 8-direction resize handles; subclasses contribute only the inner content (e.g. SVG chart, img element).
protected DrawingOverlayBase<TDrawing>()The base CSS class for this drawing kind, e.g. rz-spreadsheet-chart.
protected string BaseCssClass { get; }
| Type | Description |
|---|---|
| string | The base CSS class for this drawing kind, e.g. rz-spreadsheet-chart. |
Gets or sets the virtual grid context used to translate cell ranges to pixel rectangles.
public Spreadsheet.IVirtualGridContext Context { get; set; }
| Type | Description |
|---|---|
| Spreadsheet.IVirtualGridContext | Gets or sets the virtual grid context used to translate cell ranges to pixel rectangles. |
The drawings to render.
protected IEnumerable<Spreadsheet.TDrawing> Drawings { get; }
| Type | Description |
|---|---|
| IEnumerable<Spreadsheet.TDrawing> | The drawings to render. |
Whether the outer element should attach a context-menu handler. Off by default; override to true when MouseEventArgs,`0) is implemented.
protected bool HasContextMenu { get; }
| Type | Description |
|---|---|
| bool | Whether the outer element should attach a context-menu handler. Off by default; override to true when MouseEventArgs,`0) is implemented. |
Gets or sets the worksheet whose drawings are rendered.
public Documents.Spreadsheet.Worksheet Worksheet { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Worksheet | Gets or sets the worksheet whose drawings are rendered. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | builder |
Computes the drawing's effective pixel dimensions (handles both anchor modes).
protected ValueTuple<double, double> GetDimensions(Spreadsheet.TDrawing drawing, Documents.Spreadsheet.RangeRef range)
| Type | Name | Description |
|---|---|---|
| Spreadsheet.TDrawing | drawing | |
| Documents.Spreadsheet.RangeRef | range |
| Type | Description |
|---|---|
| ValueTuple<double, double> |
Computes the cell range covered by the drawing, including OneCellAnchor walk to find the end cell.
protected Documents.Spreadsheet.RangeRef GetDrawingRange(Spreadsheet.TDrawing drawing)
| Type | Name | Description |
|---|---|---|
| Spreadsheet.TDrawing | drawing |
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef |
Whether the supplied drawing is the currently selected one.
protected abstract bool IsSelected(Spreadsheet.TDrawing drawing)
| Type | Name | Description |
|---|---|---|
| Spreadsheet.TDrawing | drawing |
| Type | Description |
|---|---|
| bool |
Optional context-menu handler. No-op by default.
protected virtual void OnDrawingContextMenu(MouseEventArgs e, Spreadsheet.TDrawing drawing)
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e | |
| Spreadsheet.TDrawing | drawing |
Repaints this overlay when a drawing of its own kind changes geometry during a drag.
protected void OnDrawingGeometryChanged(Documents.Spreadsheet.IAnchoredDrawing drawing)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.IAnchoredDrawing | drawing |
Handles pointer-down on the drawing's outer element. Default selects the drawing and clears the cell selection.
protected virtual void OnDrawingPointerDown(PointerEventArgs e, Spreadsheet.TDrawing drawing)
| Type | Name | Description |
|---|---|---|
| PointerEventArgs | e | |
| Spreadsheet.TDrawing | drawing |
Renders the drawing-specific inner content into the container.
protected abstract void RenderInner(Rendering.RenderTreeBuilder builder, Spreadsheet.TDrawing drawing, Documents.Spreadsheet.RangeRef range)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | builder | |
| Spreadsheet.TDrawing | drawing | |
| Documents.Spreadsheet.RangeRef | range |
Sets the worksheet's selected drawing to this one.
protected abstract void SelectDrawing(Spreadsheet.TDrawing drawing)
| Type | Name | Description |
|---|---|---|
| Spreadsheet.TDrawing | drawing |