question

DimChris avatar image
0 Votes"
DimChris asked ·

Do i need to use Compiled Bindings ?

I am populating listview directly, inside my mvvm.
Example

var client = new HttpClient();
var answer = await client.GetAsync(url);
var jsonString= await answer.Content.ReadAsStringAsync();

var list= JsonConvert.DeserializeObject<List<Person>>(jsonString);

listview.ItemSource=list;

Do i need compiled bindings in my case for increase performance? Or i don't need to use them, if i populate my listiview directly?




dotnet-xamarinforms
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLu-MSFT avatar image
0 Votes"
LeonLu-MSFT answered ·

Hello,​

Welcome to our Microsoft Q&A platform!

Do i need compiled bindings in my case for increase performance? Or i don't need to use them, if i populate my listiview directly?

No, compiled bindings is the same as set ItemSource directly to listview for performance. If you want to change the data at runtime and want to UI update at the same time, you can use compiled bindings

Best Regards,

Leon Lu



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.