Skip to content
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

Xamarin.Forms does not have a view lifecycle/activation hook, someone should PR it into Xamarin.Forms #1133

Closed
ghuntley opened this issue Jul 8, 2016 · 9 comments

Comments

@ghuntley
Copy link
Member

ghuntley commented Jul 8, 2016

Xamarin Forms still does not have a view lifecycle/activation hook, someone should PR it into Xamarin.Forms now that it is open source. Kent has the details and can act as a mentor for anyone whom wishes to help make this happen.

If you want to make self-contained reactive views with RxUI prior to the XF issue being addressed, you're not ​_completely_​ dead in the water - see https://gist.github.com/kentcb/d8f310a4db40cc6833c5df48fa2de31a (for v7 upwards)

@marukami
Copy link

marukami commented Jul 8, 2016

@MelbourneDeveloper
Copy link

This is a big issue. Pages have OnAppearing, but Views don't. How are we supposed to know when the control put on screen?

@kentcb
Copy link
Contributor

kentcb commented Feb 17, 2017

@kentcb
Copy link
Contributor

kentcb commented Feb 17, 2017

@MelbourneDeveloper btw, the only recourse I have found is to forward life cycle events from the host page to any views within it that need to activate/deactivate. It's a bit annoying, but it works. Of course, we want to improve the story a lot moving forward, hence the XF proposal.

@MelbourneDeveloper
Copy link

I'm going to use the OnParentSet method which sucks but will probably do the job until this is fixed.

@ghuntley
Copy link
Member Author

Microsoft announced at build they are adding these hooks into XF.

@glennawatson
Copy link
Contributor

@PureWeen What's the status on this one?

@PureWeen
Copy link
Contributor

Unfortunately we weren't able to get this into 4.0 because the implementation wasn't quite right

I have parts of that work accomplished here for shell
xamarin/Xamarin.Forms#6527

This takes a couple steps forward with setting up Appearing to actually represent Appearing opposed to Appeared. Once that's in I'm hoping to propagate that down to the View level then work on appeared.

Out of curiosity would you make use of an Appeared event at all?

It seems like for MVVM Appearing is most important.

@ChrisPulman
Copy link
Member

As Xamarin is no longer supported I am closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants