public MainWindow(MainWindowViewModel viewModel) : this() { viewModel.Photos.CollectionChanged += Photos_CollectionChanged; WireUIElementForDragAndDrop(this.image1, p => { return IsInBounds(p); }); WireUIElementForDragAndDrop(this.image2, p => { return IsInBounds(p); }); output.TextChanged += output_TextChanged; }
protected override void OnStartup(StartupEventArgs e) { var mainWinViewModel = new MainWindowViewModel(); var mainWid = new MainWindow(mainWinViewModel); //var img = new Image() //{ // Source = new BitmapImage(new Uri(@"C:\Users\phil.SONOCINE\Pictures\image001.png")) //}; //mainWinViewModel.Photos.Add(img); mainWid.Show(); }