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.DashBoardItemA single item on the dashboard that can be moved and resized if desired. The content of the item is provided by theChildContentparameter. TheDashBoardItemcomponent also provides aResizeGrabberand aMoveGrabberparameter that can be used to provide custom resize and move grabbers. TheHeaderparameter can be used to provide a custom header for the item. If the defaultMoveGrabberandHeaderarrangement in HTML is not as wanted,FullHeadermay be used to fully customize the header, including theMoveGrabber. -
X39.Util.Blazor.WebAssembly.Components.DashBoard.DashBoardDefaultResizeGrabberA default resize grabber that can be used to resize the dashboard item. You can provide your own to theDashBoardItemcomponent if desired. -
X39.Util.Blazor.WebAssembly.Components.DashBoard.DashBoardDefaultMoveGrabberA default move grabber that can be used to move the dashboard item. You can provide your own to theDashBoardItemcomponent if desired.
- Main component:
Services (use builder.Services.AddAttributedServicesFromAssemblyOf<X39.Util.Blazor.WebAssembly.Assembly>(builder.Configuration) to add all of them):
-
LocalStorageoffers a simple way to store and retrieve data from the browser's local storage. -
ComponentUtilJavaScript interop service-
GetElementBoundsAsync(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().
-