private void WindowLoaded(object sender, RoutedEventArgs e) { Photos = (PhotoList)(this.Resources["Photos"] as ObjectDataProvider).Data; Photos.Path = "...\\...\\Resources"; PhotoTray = (PrintList)(this.Resources["PhotoTray"] as ObjectDataProvider).Data; }
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; }