简体   繁体   中英

Blazor RenderTreeBuilder builder Resize

im trying to bind the "resize" eventlistener to my component. I dont know why but it isnt working for me.

public event Action SizeChangedAction;

builder.AddAttribute(5, "resize", SizeChangedAction);

OnMouseUp OnClick everything working fine.

builder.AddAttribute(GetSequenceIndex(), "onmouseup", EventCallback.Factory.Create(component, component.OnMouseUp.InvokeAsync));

Does someone know how to get this working?

The "resize" event isn't a supported bindable event in Blazor, it's a JavaScript event.

There have been some attempts to write size event handling code, see https://github.com/EdCharbeneau/BlazorSize as one example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM