Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clearing FlipTileData BackBackgroundImage

I have a periodic task that updates my live tile. Basically it looks like this:

    var tileData = new FlipTileData()
    {
        BackgroundImage = mediumFrontUrl,
        BackBackgroundImage = mediumBackUrl,
        WideBackgroundImage = wideFrontUrl,
        WideBackBackgroundImage = wideBackUrl
    };

    ShellTile primaryTile = ShellTile.ActiveTiles.First();
    if (primaryTile != null)
    {
        primaryTile.Update(tileData);
    }

There are certain occasions where I would like to not display the BackBackgroundImage and WideBackBackgroundImage. How do I clear the values? Simply setting things to null doesn't work (it just keeps what was there previously). According to the docs if I use XAML to create the live tile I can set Action="Clear". How do I set that in code?

like image 306
Zik Avatar asked Jun 26 '26 21:06

Zik


1 Answers

You can clear the property for each Tile property.

For BackBackgroundImaga it's Empty URI: BackBackgroundImage = new Uri("", UriKind.Relative)

More info on msdn page Tiles Overview for Windows Phone: http://msdn.microsoft.com/en-us/library/hh202948%28v=vs.92%29.aspx

Hope this help Best regards

like image 88
Spaso Lazarevic Avatar answered Jun 30 '26 16:06

Spaso Lazarevic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!