c# - Showing progress of async method that is downloading data from a WCF service -
i'm trying show progress of method loading data wcf service wpf application.
i have 1500 lines of data in table want load datagrid, takes quite while load data , want show user progress of download know how long it's going take.
here coding far:
this method load data wcf service
private async task updatestockasync() { using (truckserviceclient service = new truckserviceclient()) { var allstock = await service.getsysprostockasync(); dgsysprostock.itemssource = allstock.select(x => new allstock { id = x.id, ... materialthickness = x.materialthickness }).toarray(); } }
here call updatestockasync
method window loaded event
private void sysprostock_loaded(object sender, routedeventargs e) { task.run(() => updatestockasync()); }
how possible show status of the download in progressbar?
Comments
Post a Comment