Library offering a set of useful extensions and components for Blazor WebAssembly.
Components:
- DashBoard component with support for resizing and moving items.
- Main component:
X39.Util.Blazor.WebAssembly.Components.DashBoard.DashBoard
, represents a container that organizes a single dashboard. X39.Util.Blazor.WebAssembly.Components.DashBoard.DashBoardItem
A single item on the dashboard that can be moved and resized if desired. The content of the item is provided by theChildContent
parameter. TheDashBoardItem
component also provides aResizeGrabber
and aMoveGrabber
parameter that can be used to provide custom resize and move grabbers. TheHeader
parameter can be used to provide a custom header for the item. If the defaultMoveGrabber
andHeader
arrangement in HTML is not as wanted,FullHeader
may be used to fully customize the header, including theMoveGrabber
.X39.Util.Blazor.WebAssembly.Components.DashBoard.DashBoardDefaultResizeGrabber
A default resize grabber that can be used to resize the dashboard item. You can provide your own to theDashBoardItem
component if desired.X39.Util.Blazor.WebAssembly.Components.DashBoard.DashBoardDefaultMoveGrabber
A default move grabber that can be used to move the dashboard item. You can provide your own to theDashBoardItem
component if desired.
- Main component:
Services (use builder.Services.AddAttributedServicesFromAssemblyOf<X39.Util.Blazor.WebAssembly.Assembly>(builder.Configuration)
to add all of them):
LocalStorage
offers a simple way to store and retrieve data from the browser's local storage.ComponentUtil
JavaScript interop serviceGetElementBoundsAsync(ElementReference elementReference)
returns the values of the javascriptgetBoundingClientRect()
function.RegisterOnResize(ElementReference elementReference, Func<Rectangle<double>, ValueTask> callback)
allows to register a callback that is called when the element is resized, usingResizeObserver
.RegisterWindowEvent(string eventName, Func<JsonElement, ValueTask> callback)
allows to register a callback that is reacting to a window event, usingwindow.addEventListener()
.