0
Windows Phone 8.1의 다른 스레드에있는 Windows.UI.Xaml.Controls.TextBox
의 텍스트에서 텍스트를 읽는 방법은 무엇입니까?다른 스레드의 Windows.UI.Xaml.Controls.TextBox에서 텍스트를 읽는 방법 - Windows Phone 8.1
txtUserName
의 텍스트에 액세스하는 동안 다음과 같은 예외 예외가 발생합니다.
private void btnLogin_Click(object sender, RoutedEventArgs e)
{
if (txtUserName.Text.IsNull() || txtPassword.Text.IsNull()) return;
var task = new System.Threading.Tasks.Task(DoLoginAsync);
task.Start();
}
private async void DoLoginAsync()
{
string userName = txtUserName.Text;
string password = txtPassword.Text;
var apiReq = new WebAPIRequest();
var response = await apiReq.APIRequest<Request, Response>(Action.LogIn, new Request { UserName = userName, Password = password });
// Code..
}