Class DesignerState
- Namespace
- ReportWright.Blazor.Designer
- Assembly
- ReportWright.Blazor.Designer.dll
The designer with no markup: the document, zoom and snap, the armed palette tool, the drag in progress with its smart guides, in-place text editing, the clipboard cache, validation, and loading and saving through the backend. The component renders this; a test drives it.
public sealed class DesignerState : IDisposable
- Inheritance
-
DesignerState
- Implements
- Inherited Members
Constructors
- DesignerState(ReportDesignerBackend, ItemRegistry?)
Initializes the state with a blank report.
Fields
- Handles
The eight handles, for drawing.
Properties
- ArmedTool
Gets the armed palette tool, or null (A.3.5).
- Backend
Gets the backend.
- Document
Gets the open document.
- Drag
Gets the drag in progress.
- DragPayload
Gets or sets what an HTML drag from the palette (
tool:id) or the data pane (field:Name) carries, since the browser's data transfer is not readable from the component.
- EditingTextbox
Gets the textbox being edited in place, or null.
- Error
Gets the last error message, or null.
- HandleSlopPx
Gets or sets half the hit size of a resize handle in CSS pixels: 5 for a fine pointer, 22 under
(pointer: coarse)(A.3.9).
- IsBusy
Gets whether a load or save is in progress.
- IsPreview
Gets whether the preview tab is active.
- Issues
Gets the validation issues for the current tree, computed once per change.
- LaneResizePreview
The lane size a resize drag previews, in twips.
- LastCopied
Gets the text the last cut or copy produced, for a host without a clipboard API.
- PreviewWithSampleData
Gets or sets whether the preview runs on invented sample data (true) or the host's data (false).
- Registry
Gets the item registry.
- Scale
Gets the scale: CSS pixels per twip at the current zoom.
- SelectedCell
Gets the selected visual cell, or null.
- SelectedCellTextbox
Gets the textbox inside the selected cell, or null.
- SelectedTablix
Gets the Tablix the selection is in: the single selected Tablix, or the region of a cell selection; null otherwise.
- SelectedTablixEditor
Gets an editor for the selected Tablix, or null.
- SelectedTablixModel
Gets a read view of the selected Tablix, or null.
- SelectedTextboxes
Gets the textboxes the formatting toolbar acts on: the selected textbox items, or the textboxes of the selected cell or cell range. Empty when nothing selected holds text.
- SelectedVisual
Gets the single selected chart, gauge panel or barcode, or null.
- SelectedVisualKind
Gets the kind of SelectedVisual, or None.
- ShowData
Gets or sets whether the data pane is shown.
- ShowGrid
Gets or sets whether the grid is drawn.
- ShowPalette
Gets or sets whether the palette pane is shown.
- ShowProperties
Gets or sets whether the property grid is shown.
- SnapStep
Gets the snap step in twips: 90, 180, or 0 for off (A.1.4).
- ZoomPercent
Gets the zoom percentage (A.1.3 presets).
Methods
- Arm(ReportItemDescriptor?)
Arms a palette tool, or disarms when the same tool is armed (A.3.5).
- BeginEdit(RdlElement)
Begins editing a textbox's text in place (F2 / Enter / double-click).
- BeginLaneResize(DesignBand, RdlElement, bool, int, int, int)
Begins a lane resize from a grip: a visual column's right edge or a visual row's bottom edge (header lanes included).
- BindSelectedCell(string)
Binds a field to the selected body cell, labelling the header above when it is empty.
- BindVisual(RdlElement, string)
Binds a dropped field to a visual (A.7.6): a numeric field adds a series to a chart and rebinds a sparkline, data bar, gauge or indicator; a text field becomes a chart's category; any field becomes a barcode's value.
- CancelDrag()
Abandons the drag without changing anything.
- CellRangeBounds(TablixModel, DesignSelection)
The visual bounds of a cell range, relative to the Tablix.
- ClearSelectedCell()
Clears the selected cell's text (Delete in a cell).
- CommitEdit(string)
Commits an in-place edit as one entry and ends it.
- Copy()
Copies the selection as a fragment and remembers it.
- CursorFor(ResizeHandle)
The CSS cursor for a handle.
- Cut()
Cuts the selection as a fragment and remembers it.
- DeleteCellColumn()
Deletes the selected cell's body column.
- DeleteCellRow()
Deletes the selected cell's body row.
- Dispose()
Releases the document.
- DropExpression(DesignBand, int, int, string)
Drops an expression at a point: a built-in field (
=Globals!PageNumber) or a parameter (=Parameters!Region.Value) dragged from the data pane. On a textbox it replaces the value; elsewhere it creates a textbox holding it. One undo entry either way.
- DropField(DesignBand, int, int, string)
Creates a textbox bound to a field at a point (a field dropped on empty canvas, A.3.6).
- Escape()
Escape: cancels an in-place edit, else disarms the tool, else clears the selection (A.2.6, A.5).
- HandleAt(ItemBounds, int, int)
The handle under a point around a single selection's bounds, or null.
- HandleCentre(ItemBounds, ResizeHandle, out int, out int)
The centre of a handle on a box.
- HandleKey(string, bool, bool)
Handles a designer shortcut (A.5). The component calls this only when focus is not in a text input.
- InsertColumnBesideCell(TablixInsertSide)
Inserts a column beside the selected cell's body column.
- InsertRowBesideCell(TablixInsertSide)
Inserts a row beside the selected cell's body row (header rows take the first body row).
- Load(byte[], string?)
Opens a report from bytes already in hand.
- LoadAsync(string, CancellationToken)
Opens a report from the backend.
- MemberOf(RdlElement)
The member view of a member element in the selected Tablix, or null.
- MergeSelectedCells()
Merges the selected cell range (body cells only).
- MoveCell(int, int)
Moves the cell selection by a step within the grid (Tab, Shift+Tab, arrows in a cell).
- New()
Starts a blank report.
- Paste(string?, ItemBounds?)
Pastes a fragment into the selection's band, offset or at a point (A.4.4). Clipboard text that is not a fragment pastes nothing; a null (unreadable clipboard) falls back to the last copy made here.
- PointerDown(DesignBand, int, int, bool)
Pointer-down on a band: places the armed tool, grabs a handle, selects and starts a move, or starts a rubber band (A.2, A.3).
- PointerMove(int, int)
Pointer-move during a drag: updates the preview with grid snapping and smart guides (A.3.4).
- PointerUp()
Pointer-up: commits the drag as one undo entry; a click that moved nothing produces none (A.3.7).
- Px(int)
Converts twips to CSS pixels at the current zoom.
- RebindTextbox(RdlElement, string)
Rebinds a textbox to a field (a field dropped on it, A.3.6).
- SaveAsync(string?, CancellationToken)
Saves to the document's path, or to a new path.
- SelectAll()
Selects every item on every band (Ctrl+A, A.2.6).
- SelectCellsTablix()
From a cell back to its Tablix (Escape in a cell).
- SetSnap(int)
Sets the snap step.
- SetZoom(int)
Sets a zoom preset.
- ShowPreview(bool)
Switches between the design surface and the preview tab (F5, A.5).
- Snap(int)
Snaps a coordinate to the current step.
- SplitSelectedCell()
Splits the selected merged cell.
- TextOf(RdlElement)
The current text of a textbox.
- TextOwner(RdlElement)
The element whose
Valueis a textbox's text: the first run, or the textbox itself in RDL 2005.
- Tw(double)
Converts CSS pixels to twips at the current zoom.
- ZoomIn()
Steps to the next preset.
- ZoomOut()
Steps to the previous preset.
Events
- Changed
Raised after anything observable changed.