I have the following Content Page
TitlePage.cs
public string synced
{
get; set;
}
public TitlePage()
{
DependencyService.Get().sync();
Button btnStart = new Button
{
Text = "Vendors",
FontSize = Device.GetNamedSize(NamedSize.Medium,typeof(Button))
};
btnStart.Clicked += (sender, args) =>
{
App.Current.MainPage = new buildingMaterialsPage();
};
Label lblSynced = new Label
{
Text = synced
};
this.Content = new StackLayout
{
Children =
{
btnStart,
lblSynced
}
};
}
I also have a function Android_Zumero.cs
public async void sync()
{
sqliteFilename = "marketvendors.db3";
fullPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); // Documents folder
path = Path.Combine(fullPath, sqliteFilename);
try
{
System.IO.File.Delete(path);
}
catch
{
}
try
{
await Task.Run(() => {
DataLayer.Sync(path, "", urlText, sDbfile, sAuthScheme, sUsername, sPassword);
//Need to set value of string here
});
}
catch (Exception e)
{
return;
}
}
I need to set the value of the string after the Sync process is finished.
How can I do this