Friday, March 28, 2014
Developer Log- Are we clear? No, we're opauqe
So I wrote an interesting little hack today to fix an issue while working on Project: Howland.
I was adding an option to change the background of the application to a user chosen background image from the photos hub. The issue, which I still don't fully understand, had something to do with the fact that the applications default background is the users accent color on their phone. I struggled with this issue for about an hour, until I decided to cheat.
Rather than change the user's background image to whichever image they choose directly, I lowered the opacity of the accent color background to 0 when the user chooses a background image. This actually made it easier in the long run, because to reset the image to the default, I just change the opacity back to 1.
if background image
pivotPage1.LayoutRoot.Background.Opacity = 0;
else if no background image
pivotPage1.LayoutRoot.Background.Opacity = 1;
_________
Footnote: A teaser of Howland:
Labels:
Developer Log
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment