private void AddPhoto(object sender, RoutedEventArgs e)
        {
            var ofd = new Microsoft.Win32.OpenFileDialog()
            {
                Filter = "JPG Files (*.jpg)|*.jpg|PNG Files (*.png)|*.png|GIF Files (*.gif)|*.gif"
            };
            var result = ofd.ShowDialog();

            if (result == false)
            {
                return;
            }
            ImageFile item = new ImageFile(ofd.FileName);

            item.AddToCache();
            Photos.Init(PhotosFolder.Current);
        }
        private void WindowLoaded(object sender, EventArgs e)
        {
            var layer = AdornerLayer.GetAdornerLayer(CurrentPhoto);

            _cropSelector = new RubberbandAdorner(CurrentPhoto)
            {
                Window = this
            };
            layer.Add(_cropSelector);
#if VISUALCHILD
            CropSelector.Rubberband.Visibility = Visibility.Hidden;
#endif
#if NoVISUALCHILD
            CropSelector.ShowRect = false;
#endif

            Photos = (PhotoList)(this.Resources["Photos"] as ObjectDataProvider)?.Data;
            Photos.Init(PhotosFolder.Current);
            ShoppingCart = (PrintList)(this.Resources["ShoppingCart"] as ObjectDataProvider)?.Data;
        }