Ejemplo n.º 1
0
        public ImageViewModel(iImageModel argImage, iGalleryViewModel argGovernor)
        {
            _modelImage = argImage;
            _governor   = argGovernor;

            cmdIncRating = new SimpleCommand(IncRating_Execute, IncRating_CanExecute);
            cmdDecRating = new SimpleCommand(DecRating_Execute, DecRating_CanExecute);
            cmdRemove    = new SimpleCommand(Remove_Execute);
        }
Ejemplo n.º 2
0
        internal MainWindow(iGalleryViewModel gallery, iTreeViewModel tree)
        {
            InitializeComponent();

            GalleryVM = gallery;
            listviewGallery.DataContext = GalleryVM;
            controlImage.DataContext    = GalleryVM;
            TreeVM = tree;
            expandBrowser.DataContext = TreeVM;
            buttonAdd.DataContext     = GalleryVM;

            Closing += GalleryVM.OnClose;
        }