c# - Pass Parameter or Arguments to a Background task in Uwp -
i creating uwp app in want take data user textbox , pass background task. when trying add project reference background task getting circular reference error. there way pass arguments maybe overload of run function or else. in advance.
romasz has explained in case can user data textbox doing these steps:
1.declare in mainpage.xaml.cs(or xaml page)
var localsettings = windows.storage.applicationdata.current.localsettings; localsettings.values["user"] = user.text;
2.now data in backgroundtask.cs using these
var localsettings = windows.storage.applicationdata.current.localsettings; string user = localsettings.values["user"].tostring();
here variable user has texbox data wanted mainpage.
note:i have assumed have named textbox "user"
Comments
Post a Comment