Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Bind Label visibility to List being empty or not

$
0
0

How can I bind the visibility of a Label, where the Label is visible if a list is empty? Below doesn't work.

    bool _showAllUsersEmptyLabel;
    public bool ShowAllUsersEmptyLabel
    {
        get
        {
            return _showAllUsersEmptyLabel;
        }
        set
        {
            _showAllUsersEmptyLabel = (AllUsers != null && !AllUsers.Any());
            this.OnPropertyChanged(nameof(this._showAllUsersEmptyLabel));
        }
    }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>