public object Convert(object value, Type targetType, object parameter, string language)
        {
            if (value == null)
            {
                return(null);
            }
            WallpaperSize wallpaperSize = (WallpaperSize)value;
            string        name          = wallpaperSize.GetName();

            if (wallpaperSize == WallpaperSizeHelper.GetDefaultSize())
            {
                name = name + ResourcesHelper.Default;
            }
            return(name);
        }
 public static double GetHeight(this WallpaperSize size)
 {
     return(int.Parse(size.GetName().Split('x')[1]));
 }
 public static string GetUrlWithSize(this ImageArchive imageArchive, WallpaperSize size)
 {
     if (imageArchive == null)
     {
         return(null);
     }
     return(string.Format("http://www.bing.com{0}_{1}.jpg", imageArchive.UrlBase, size.GetName()));
 }
 public static int GetWidth(this WallpaperSize size)
 {
     return(int.Parse(size.GetName().Split('x')[0]));
 }