private static async Task SetBingImageAsync()
        {
            var bingImage = new BingImage();
            var bingUnit  = await bingImage.GetTodayBingUnit(BingImageResolution.LARGE);

            if (bingUnit != null)
            {
                //imgBingScreen.Source = new BitmapImage(new Uri(bingUnit.Path));
            }
        }
        public async Task SetBingImageAsync()
        {
            BingImage bingImage = new BingImage();
            var       bingUnit  = await bingImage.GetTodayBingUnit(BingImageResolution.LARGE);

            if (bingUnit != null)
            {
                imgPreview.Source = new BitmapImage(new Uri(bingUnit.Path));
            }
        }
Example #3
0
        public async Task <CBBingImageBackground> GetBingImageAsync()
        {
            BingImage bingImage = new BingImage();
            var       bingUnit  = await bingImage.GetTodayBingUnit(BingImageResolution.LARGE);

            if (bingUnit != null)
            {
                var bg = new CBBingImageBackground();
                bg.Background = bingUnit.Path;
                bg.Copyright  = bingUnit.Copyright;
                return(bg);
            }
            return(null);
        }