Last active
December 14, 2015 22:48
-
-
Save mrlacey/5161035 to your computer and use it in GitHub Desktop.
On low spec WP8 devices we had an issue where the UI option to create a secondary tile wasn't always being enabled properly. After identifying the most likely cause as the `CanPin()` method I had to refactor it to make it debuggable and in doing so made the binding/timing issue go away (solved it).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal bool CanPin() | |
{ | |
return !this.IsPinned() | |
&& this.UnderlyingModel != null | |
&& !this.IsRunningInKidsCorner() | |
&& (this.UnderlyingModel.IsSpecial | |
|| string.IsNullOrWhiteSpace(this.UnderlyingModel.ArtUrl) | |
|| (!string.IsNullOrWhiteSpace(this.UnderlyingModel.ArtUrl) | |
&& this.imageCacher.IsCached(this.UnderlyingModel.ArtUrl))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment