-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SizeChanged
event
#326
Comments
Thanks for reporting. |
Awesome, thanks a lot for adding this so fast. |
Hm, not sure if this helps me a lot, though: View.AbsoluteLayout(...)
|> sizeChanged (fun _ -> dispatch (SetSceneSize ???)) How do I get the size now from within the event handler? I neither get the sender nor do I get useful event args. |
Ah. Xamarin.Forms does not send the new size...
As I would prefer not to pass the sender, I think we can create a new type View.AbsoluteLayout(...)
|> sizeChanged (fun args -> dispatch (SetSceneSize (args.Width, args.Height))) |
Yeah, I would also prefer that, thanks a lot. |
I would like to store the size of an
AbsoluteLayout
control within my model, because based on that I can tell whether some controls (i.e. players) within this layout are touching the border. Xamarin.Forms hasVisualElement.SizeChanged
, but in Fabulous I couldn't find something similar. The only thing I found wasOnSizeAllocatedCallback
which only works when attached to aContentPage
.Would it be possible for you to enable
SizeChanged
events forViewElement
s or how else could I store the size of a specific control within my Elmish model?The text was updated successfully, but these errors were encountered: