Exemplo n.º 1
0
        public MainPageViewModel()
        {
            Images = new List<ImageItem>();

            var files = Utilities.GetPictureList();
            foreach (var file in files)
            {
                if (Utilities.IsValidImageFile(file))
                {
                    ImageItem image = new ImageItem();
                    image.Uri = new Uri(file);
                    image.Name = file.Substring(file.LastIndexOf(@"\") + 1);
                    Images.Add(image);
                }
            }
        }
Exemplo n.º 2
0
        public MainPageViewModel()
        {
            Images = new List <ImageItem>();

            var files = Utilities.GetPictureList();

            foreach (var file in files)
            {
                if (Utilities.IsValidImageFile(file))
                {
                    ImageItem image = new ImageItem();
                    image.Uri  = new Uri(file);
                    image.Name = file.Substring(file.LastIndexOf(@"\") + 1);
                    Images.Add(image);
                }
            }
        }
Exemplo n.º 3
0
        private void LoadPictures(string[] pictures)
        {
            Images.Clear();

            foreach (var picture in pictures)
            {
                if (Utilities.IsValidImageFile(picture))
                {
                    ImageItem image = new ImageItem();
                    image.Uri = new Uri(picture);
                    image.Name = picture.Substring(picture.LastIndexOf(@"\") + 1);
                    Images.Add(image);
                }
            }
        }