Let's say I want to create a clock.
If I update a regular Label after waiting for a second in an async function with Task.Delay(1000), it works.
But if I do it inside a custom ViewCell from a ListView, the Label will just clear, become blank.
Here's the part of the code where the problem happens:
label.Text = TimeSpan.FromTicks(DateTime.Now.Ticks).ToString(@"hh\:mm\:ss");
It updates the label the first time, then the label becomes blank.
I'm attaching a test project to see it in action. Just hit any Start Button.
BTW this code is working fine in iOS and wasn't tested in Android. This problem happens in UWP.
OK, I tried adding a testcase project, but the smallest file size I got was almost 20mb. And the limit is 8. And the project is a new project created just for this purpose.
Please guide me on how to do it.
Meanwhile, here's a link to it in my Dropbox: https://dl.dropboxusercontent.com/u/8897858/App2.zip
Created attachment 18610 [details]
Ok, I managed to send a smaller file size, but without the packages. All I can say is that Forms was updated to the latest stable version today when I created this project.
I tried using Device.StartTimer and it doesn't work wither.
Created attachment 18875 [details]
Attaching fixed repro project as the original was missing the .sln file
I can confirm the issue on UWP with Forms 2.3.3
I tried using Device.BeginInvokeOnMainThread and it didn't work either. Same behavior.
I've noticed a label going blank on me in the scenario described here too (XF 2.3.3/UWP/ListView/ViewCell). But I found this issue report while researching a similar problem...
I've found that while using an Entry view in the ViewCell that if you click into the Entry text (populated via code behind) the caret does not show. A window resize fixes the problem.
By comparison as a test, if I use an EntryCell it works fine.
And just to add to the pattern, using a DatePicker in the ViewCell, after picking a date from the picker, the date display goes blank until a resize of the window...
Should be fixed in 2.3.5-pre1. Thank you!
Verified on xamarin.form version 220.127.116.116-pre6.
ScreenCast link: https://www.screencast.com/t/m17rNOiU
Notice (2018-05-21): bugzilla.xamarin.com will be
switching to read-only mode on Thursday, 2018-05-25 22:00 UTC.
Please join us on
Visual Studio Developer Community and
GitHub to continue tracking
issues. Bugzilla will remain available for reference in read-only mode.
We will continue to work on open Bugzilla bugs and copy them to the new
locations as needed for follow-up. The See Also field
on each Bugzilla bug will be updated with a link to its new location
After Bugzilla is read-only, if you have new information to add for a
bug that does not yet have a matching issue on Developer Community or
GitHub, you can create a follow-up issue in the new location. Copy and
paste the title and description from this bug, and then add your new
details. You can get a pre-formatted version of the title and
In special cases you might also want the comments:
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.