Bug 57965 - Entry control disappear when use same instance is different page.
Summary: Entry control disappear when use same instance is different page.
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-07-06 06:13 UTC by Paul Anderson
Modified: 2017-07-06 22:57 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample (267.35 KB, application/zip)
2017-07-06 06:13 UTC, Paul Anderson
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Paul Anderson 2017-07-06 06:13:18 UTC
Created attachment 23320 [details]
Sample

We have prepared simple Entry sample. In this sample, we have added two pages. First page create Entry instance and added First page content and pass the same instance to second page and added entry instance to second page content.
 
First page entry are disappear after navigate the second page.
 
Replication steps:
Run the sample
First page could see Entry control and able to enter text
Click next page button
Second page could see Entry control and able to enter text
Click back button. First page Entry control are disappeared this is issue.
 
Can you please suggest us how to fix this issue?
Comment 1 Jimmy [MSFT] 2017-07-06 22:57:54 UTC
This happens because you are adding the same control to the new page. This means that it is removed from the layout in the first page. So when you navigate back, you have to re-add the control to the first page. You can utilize OnAppearing() to do this: https://gist.github.com/jimmgarrido/9a259c445d74273795bae8f2155915de

Hope this helps!