Exemplo n.º 1
0
        public static IObservable <Unit> SetNowPlayingTileAsync(PlayingMixContract mix, string title, string backTitle)
        {
            if (!BackgroundPinService.IsApplicationPinnedToStart())
            {
                return(Observable.Empty <Unit>());
            }

            return(Observable.Defer(() => SaveFadedThumbnailAsync(mix)).SubscribeOnDispatcher().Try(
                       url => BackgroundPinService.UpdateFlipTile(
                           title,
                           backTitle,
                           mix.MixName,
                           mix.MixName,
                           0,
                           BackgroundPinService.DefaultTileUrl,
                           url,
                           url,
                           null,
                           new Uri(url.OriginalString.Replace(".jpg", ".wide.jpg"), UriKind.RelativeOrAbsolute),
                           null)
                       ).Select(_ => new Unit()));
        }
Exemplo n.º 2
0
 public static void ResetNowPlayingTile()
 {
     BackgroundPinService.ResetApplicationTile();
 }