public MainWindow()
        {
            InitializeComponent();
            this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (o, e) => { this.Close(); }));
            var profile = new ExProfile();

            _evm = null;
            explr.DataContext = _evm = new ExExplorerViewModel(profile);
            //evm.ChangeCurrentEntry(d);
            //_evm.PropertyChanged += (o, e) =>
            //    {
            //        if (e.PropertyName == "CurrentEntryViewModel")
            //        {
            //            var dvm = (_evm.CurrentEntryViewModel as DirectoryViewModel<FileInfoEx, DirectoryInfoEx, FileSystemInfoEx>);
            //            if (dvm != null)
            //            {
            //                Debug.WriteLine("CurrentItems" + dvm.SubEntries.Count);
            //                dvm.SubEntries.CollectionChanged += (o1, e1) =>
            //                {
            //                    if (e1.NewItems != null)
            //                        foreach (var item in e1.NewItems)
            //                            Debug.WriteLine("Added" + item.ToString());
            //                    if (e1.OldItems != null)
            //                        foreach (var item in e1.OldItems)
            //                            Debug.WriteLine("Removed" + item.ToString());
            //                };
            //            }
            //        }
            //    };
        }
Beispiel #2
0
        public ImageBrower()
        {
            InitializeComponent();
            ExProfile profile = new ExProfile();

            _evm = null;
            explr.DataContext = (_evm = new ExExplorerViewModel(profile));
        }