I'm attempting to have a timer update a Label that happens to be in the MainContent of a RadSideDrawer.
The label looks like:
<StackLayout Grid.Row="0">
<Label x:Name="AgeLabel"/>
</StackLayout>
And the timer looks like:
Device.StartTimer(new TimeSpan(0, 0, 1), () =>
{
AgeLabel.Text = DateTime.Now.ToLocalTime().ToString();
return true;
});
The problem is when the timer expires, the label gets updated okay, but a RadListView on the page at Grid.Row="1" gets messed up. It suddenly changes from full width of the screen to about 1/3 width of the screen. If you tap the screen it will then correct the display, but obviously you can't expect the user to keep tapping the screen.
I have trying using bindings with INotifyPropertyChanged and stuff, but that does not help, when the property updates, the list display gets messed up. I have also tried Device.BeginInvokeOnMainThread to make sure the right thread is updating the screen, also does not help.
Is it possible for a timer to update the MainContent of a SideDrawer? Is this a known issue?