I am wondering how passing by reference works in C#. If I pass a WPF DataGrid control by reference to a function, and slowly have the function add items to its DataGrid.Items collection, will the DataGrid in the UI update with each new DataGrid.Items.Add() call? Or will it only update when the function returns? I would like to achieve the former scenario, so if passing by reference doesn't do the trick, I would love some advice on how to accomplish this. Thanks in advance.
if u want the former scenario, then call the function UpdateLayout() of datagrid in the next statement after you use Add() method. Hope this will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With