Tuesday, December 18, 2012

National Geographic for Windows 8: milestone

National Geographic for Windows 8 reached a milestone today... Its not even a month since it was launched, it has already crossed 10k downloads. A serious bug has caused its ratings to go down but we hope people will like the update that we have added. Hope to see more downloads in the coming month. Thank you all for enjoying this app so far. If you find any bugs or have any suggestions please email us to silverspots@outlook.com

National Geographic for windows 8: Update available

A new update is available for National Geographic for windows 8. Some interesting bugs are fixed. :) We will soon be launching exciting features to it. till then sorry for the inconvenience caused. Keep rating it good. :)

National Geographic for Windows 8: Launch

Happy to launch the new app dedicated for National Geographic lovers. Get all the news, photos and videos from National Geographic.
The killer features include,
  1. View latest news from National Geographic.
  2. View the picture of the day
  3. Set the picture as lock screen background.
  4. Check out the videos from National Geographic.
  5. view them with in the app.
Get it from here http://apps.microsoft.com/windows/en-us/app/national-geographic-for-windows/329d02e5-806a-45f5-9b62-9bd9f7c324f0

Sunday, December 2, 2012

Set your image as lock screen background in Windows 8

Ever wondered how many times we change our wallpapers?? Well I change it everyday! With Windows 8 you can change your lock screen background too. And I can change it everyday because of my App called as National Geographic for Windows 8. And this is how I did it in xaml,

StorageFile file = await StorageFile.CreateStreamedFileFromUriAsync(URI), new Uri(URI),
                RandomAccessStreamReference.CreateFromUri(new Uri(URI)));
            await LockScreen.SetImageFileAsync(file);
            MessageDialog md = new MessageDialog("This image is set as your lock screen background", "Hurray");
            var result = await md.ShowAsync();

this code snippet would set an image from a uri and display a friendly message to the user.
you will have to include
using Windows.Storage.Streams;

using Windows.System.UserProfile;

to use the LockScreen class. LockScreen.SetImageFileAsync accepts a StorageFile object that contains a new image for the lock screen.
Now you can create an app on your own or download my app and get beautiful wallpapers and lock screen backgrounds everyday! Happy Coding!

Saturday, December 1, 2012

To embed Youtube videos in Windows 8 xaml

I was making my 5th windows 8 application called National Geographic for Windows 8. The best part of the channel’s info lies in videos and all the major videos are uploaded on  YouTube. Though YouTube exposes all the videos through its feeds, its difficult to embed their video in xaml. Mainly because xaml does not support Flash. Now YouTube supports HTML 5 videos but I was not able to find many such videos. So I thought of going ahead with Flash players in xaml. The trick lied in embedding the player in an Iframe in a WebView.

This is the code snippet,
 str = string.Format(@"<iframe width='{0}' height='{1}' src='{2}' frameborder='{3}'></iframe>", videoView.ActualWidth - 10, videoView.ActualHeight - 10, link, 0);
where "link" is my YouTube video url and  "videoView" is my WebView control in the xaml like this

<Grid Style="{StaticResource LayoutRootStyle}">
<WebView x:Name="videoView" Grid.Row="2" Margin="120,0,10,90"/>

I just did a bit of styling and here is the output,