Windows phone 8 如何在windows phone 8中基于国家/地区动态更改徽标图像
我的应用程序页面中有五个国家的徽标图像。 现在我想根据国家动态更改徽标。 如何替换徽标Windows phone 8 如何在windows phone 8中基于国家/地区动态更改徽标图像,windows-phone-8,Windows Phone 8,我的应用程序页面中有五个国家的徽标图像。 现在我想根据国家动态更改徽标。 如何替换徽标 请帮助步骤1:像这样声明一个全局变量 位图图像位 步骤2: 使用switch语句选择图像uri: public void ChoseUri(string cuntryName) { switch (cuntryName) { case "US": bit = new Bitm
请帮助步骤1:像这样声明一个全局变量 位图图像位 步骤2: 使用switch语句选择图像uri:
public void ChoseUri(string cuntryName)
{
switch (cuntryName)
{
case "US":
bit = new BitmapImage(new Uri(@"Image/Us.png", UriKind.RelativeOrAbsolute));
break;
case "INDIA":
bit = new BitmapImage(new Uri(@"Image/INDIA.png", UriKind.RelativeOrAbsolute));
break;
default:
}
}
步骤3:动态设置图像源:
imgCountry.Source=位 在此switch语句中设置您的五国uri