[Windows Phone 8.1]SecondaryTile doesn’t work

I've tried to make this work for a few days, but I can't figure out what's wrong with my code.

First, I creaded my tile using the 4th constructor, but it crashed, so I decided to take it one step at a time. This way I found out that seting logos crashes the app.

Here is the part of the code:

 private async void SeriesList_PinToStart(object sender, RoutedEventArgs e) { Anime a = (e.OriginalSource as FrameworkElement).DataContext as Anime; Uri img = await a.GetImageUri(); string id = Regex.Replace(a.name, "+|=|-|/|:|;|\\[|]|(|)|!|@|#|$|%|^|&|,|'|\"", "_"); SecondaryTile animeTile = new SecondaryTile(id); animeTile.VisualElements.Square150x150Logo = img; //Everything before this line works animeTile.VisualElements.Square30x30Logo = img; //crash animeTile.VisualElements.Square70x70Logo = img; //crash animeTile.VisualElements.BackgroundColor = Color.FromArgb(255, 64, 64, 96); //works animeTile.VisualElements.ForegroundText = ForegroundText.Light; //works await animeTile.RequestCreateAsync(); //never even checked } 

Is something wrong with the image I'm using? Here's the example file.

What else can I try?

by MrReynevan2 via /r/csharp

Leave a Reply