C# Windows Phone 7.1 live互动程序背景图像未设置
我正在尝试更改windows phone 7.1应用程序的live互动程序的背景图像(正面和背面),但从未设置背景图像。我已将这些图像添加到项目中,并确保在Uri()构造函数中正确指定它们的名称。我似乎无法发现这个问题。这是密码C# Windows Phone 7.1 live互动程序背景图像未设置,c#,windows,windows-phone-7,live-tile,C#,Windows,Windows Phone 7,Live Tile,我正在尝试更改windows phone 7.1应用程序的live互动程序的背景图像(正面和背面),但从未设置背景图像。我已将这些图像添加到项目中,并确保在Uri()构造函数中正确指定它们的名称。我似乎无法发现这个问题。这是密码 public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent();
public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
InitializeComponent();
}
String result = "Default";
String company = "";
String image = "";
//Method That Executes After Every DownloadStringAsync() Call by WebClient
public void wb_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)
{
result = e.Result;
int newCount = 1;
// Application Tile is always the first Tile, even if it is not pinned to Start.
ShellTile TileToFind = ShellTile.ActiveTiles.First();
// Application should always be found
if (TileToFind != null)
{
// Set the properties to update for the Application Tile.
// Empty strings for the text values and URIs will result in the property being cleared.
StandardTileData NewTileData = new StandardTileData
{
Title = "Stocks App",
BackgroundImage = new Uri(image, UriKind.Relative),
Count = newCount,
BackTitle = company,
BackBackgroundImage = new Uri(image, UriKind.Relative), //**The problem is here**
BackContent = result
};
// Update the Application Tile
TileToFind.Update(NewTileData);
}
}
//Method for Radio Button When Google is Selected
private void radioButton1_Checked(object sender, RoutedEventArgs e)
{
company = "Google Stock";
image = "google_icon.png";
WebClient wb = new WebClient();
wb.DownloadStringAsync(new Uri("http://finance.yahoo.com/d/quotes.csv?s=GOOG&f=a"));
wb.DownloadStringCompleted += wb_DownloadStringCompleted;
}
//Method for Radio Button When Yahoo is Selected
private void yahooRadioBtn_Checked(object sender, RoutedEventArgs e)
{
company = "Yahoo Stock";
image = "yahoo_icon.png";
WebClient wb = new WebClient();
wb.DownloadStringAsync(new Uri("http://finance.yahoo.com/d/quotes.csv?s=YHOO&f=a"));
wb.DownloadStringCompleted += wb_DownloadStringCompleted;
}
//Method for Radio Button When Apple is Selected
private void appleRadioBtn_Checked(object sender, RoutedEventArgs e)
{
company = "Apple Stock";
image = "apple_icon.png";
WebClient wb = new WebClient();
wb.DownloadStringAsync(new Uri("http://finance.yahoo.com/d/quotes.csv?s=AAPL&f=a"));
wb.DownloadStringCompleted += wb_DownloadStringCompleted;
}
}
验证映像路径和生成操作是否符合文档要求 您可以在
及
检查您的文件
生成操作
属性设置为内容
,然后再进行任何其他检查只有当磁贴flips@verdesrobert对但是当翻转发生时,backbackbackgroundimage
仍然是默认的红色阅读此内容并验证映像路径和构建操作是否符合documentation@verdesrobert我在你的评论中看不到任何链接,请编辑此链接,以便其他任何人看到它时都能轻松一点。对于这个特殊的问题,将Bulid Action设置为“content”是解决方案。你仍然可以提供链接,之后你应该在你的问题中发布一个屏幕截图,当构建操作不起作用时。