-1
我正在使用windows phone 8.1。Windows phone 8.1名稱'Thread'在當前上下文中不存在
AM得到一個錯誤的名稱「線程」中不當前上下文存在即使添加這 - >
使用的System.Threading;
我檢查這個文件夾C:\ Program Files文件(x86)的\參考大會\微軟\框架\ WindowsPhoneApp \ V8.1
的System.Threading DLL是avaliable。
如果我在列表框中選擇語言。整個頁面已被改變成語言 SO
private void LocList_SelectedIndexChanged(object sender, SelectionChangedEventArgs e)
{
var selectedCulture = locList.SelectedIndex.ToString();
string cul;
switch (selectedCulture)
{
case "0":
cul = "zh-CN";
break;
case "1":
cul = "da-DK";
break;
case "2":
cul = "fr-FR";
break;
case "3":
cul = "en-US";
break;
case "4":
cul = "en-GB";
break;
default:
cul = "en-US";
break;
}
CultureInfo newCulture = new CultureInfo(cul);
Thread.CurrentThread.CurrentCulture = newCulture;
}
SO是設置文化,當前線程,並計劃重新加載頁面
你可以在你的問題上貼一些代碼嗎? –
CultureInfo newCulture = new CultureInfo(cul); Thread.CurrentThread.CurrentCulture = newCulture; – Gayathri
這裏線程給出了上述錯誤 – Gayathri