A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Hello @Jai Holloway ,
From what you have described, I imagine you are likely setting IsVisible directly in code-behind instead of binding it to a ViewModel property that fires INotifyPropertyChanged. iOS is not forgiving about when it re-renders, so if you have something like this:
if (apiValue == 0)
myLabel.IsVisible = false;
This would create a race condition.
Using a proper binding and making sure to raise PropertyChanged when the value changes should resolve the issue. For example:
private bool _showLabel;
public bool ShowLabel
{
get => _showLabel;
set
{
_showLabel = value;
OnPropertyChanged();
}
}
And then in your XAML:
<Label IsVisible="{Binding ShowLabel}" />
I would also appreciate if you could share the relevant code snippets or more details about your implementation in future questions, to prevent any misunderstandings and to provide you with the most accurate assistance.
If this response was informative, I would be grateful if you could leave your confirmation following the instructions provided in this guide.
Thank you.