Skip to content

Conversation

@PureWeen
Copy link
Member

@PureWeen PureWeen commented Jun 8, 2021

Description of Change

Implements #1198

Additions made

  • Overrides: VisualElement.OnHandlerAttached/OnHandlerDetached/OnHandlerAttaching/OnHandlerDetaching
  • Events: VisualElement.HandlerAttached/HandlerDetached/HandlerAttaching/HandlerDetaching
Event Description Use Cases
AttachingHandler Fires before handler has created native view This is used to make sure all properties on your xplat view have been initialized so they are correctly set on inception of the native view
AttachedHandler Fires after handler has created and set the native view The NativeView is present and all of the VirtualView properties have been applied. This is where you can interact with native element
DetachingHandler Fires before the handler is going to get removed from the virtual view The NativeView is about to get removed from this Virtual element so you should unwire any native events
DetachedHandler Fires after native handler has removed the native view

@rmarinho rmarinho merged commit 983387c into main Jun 8, 2021
@rmarinho rmarinho deleted the handler_lifecycle branch June 8, 2021 10:31
lytico pushed a commit to lytico/maui that referenced this pull request Jun 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2023
@samhouts samhouts added the fixed-in-6.0.100-preview.5 Look for this fix in 6.0.100-preview.5! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

fixed-in-6.0.100-preview.5 Look for this fix in 6.0.100-preview.5! platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants