Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Update ListView XAML Programmatically

$
0
0

I am trying to update a ListView's ViewCell using C# code. Basically I want to Iterate through the listview and change the visibility of certain things within the ViewCell. Here's some pseudo code to better represent what I am trying to do.

ListView lv = listviewFromXaml; //get a populated listview from xaml

for (int a =0; a < lv.ItemCount; a++){ //Iterate through list
    if (someBoolean){
    var child = lv.getChild(a); //Get ViewCell by position
        child.exampleLabel.IsVisible = false; //Change something about the view after some simple logic
    }
}

Is Something like this possible in a Cross Platform application? Or am I stuck using Bindings in the XAML?
If it is possible, how would this be done?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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