Split out of #473, where @SimonLiebers-Dev noted in passing that BbResizablePanelGroup exposes "no OnResize, no size binding, no throttle interval and no way to opt out of the per-frame callback".
#473 removes the need for the last two — the drag no longer round-trips per frame, so there is nothing left to throttle or opt out of. But it also makes the first one matter more than it did before: component state is now deliberately stale for the duration of a drag and is committed once on pointerup, so there is a defined sync point and still no way for a consumer to observe it.
Today the sizes a user drags to are unobservable from C#. There is no way to persist a layout across sessions, react to a panel crossing a threshold, or even read the current split.
Proposal
An event callback on BbResizablePanelGroup, carrying the panel sizes as percentages in declared order.
Following the shape the library already uses for exactly this event — BbDashboardGrid.OnWidgetResizeEnd with WidgetResizeEventArgs — rather than inventing a new one.
Suggested name OnResizeEnd rather than OnResize: it fires once when the drag completes, and a name implying continuous firing would invite consumers to expect the per-frame behaviour #473 exists to remove.
Notes
- Should fire only when the sizes actually changed — a press-and-release on the handle with no movement is not a resize.
- Should carry the clamped sizes the component committed, not the raw values JS proposed.
- Needs the usual public-API companions: live demo example,
CodeExamples/.../*.txt snippet, API-reference entry, API-surface snapshot.
Depends on #473 (PR #474), which introduces the drag-end commit this hangs off.
Split out of #473, where @SimonLiebers-Dev noted in passing that
BbResizablePanelGroupexposes "noOnResize, no size binding, no throttle interval and no way to opt out of the per-frame callback".#473 removes the need for the last two — the drag no longer round-trips per frame, so there is nothing left to throttle or opt out of. But it also makes the first one matter more than it did before: component state is now deliberately stale for the duration of a drag and is committed once on pointerup, so there is a defined sync point and still no way for a consumer to observe it.
Today the sizes a user drags to are unobservable from C#. There is no way to persist a layout across sessions, react to a panel crossing a threshold, or even read the current split.
Proposal
An event callback on
BbResizablePanelGroup, carrying the panel sizes as percentages in declared order.Following the shape the library already uses for exactly this event —
BbDashboardGrid.OnWidgetResizeEndwithWidgetResizeEventArgs— rather than inventing a new one.Suggested name
OnResizeEndrather thanOnResize: it fires once when the drag completes, and a name implying continuous firing would invite consumers to expect the per-frame behaviour #473 exists to remove.Notes
CodeExamples/.../*.txtsnippet, API-reference entry, API-surface snapshot.Depends on #473 (PR #474), which introduces the drag-end commit this hangs off.