public Extraction() { this.InitializeComponent(); UnzipModel unzip = new UnzipModel(); UnzipViewModel model = new UnzipViewModel(unzip); DataContext = model; }
public UnzipViewModel(UnzipModel unzip) { this._unzip = unzip; filePicker = InitFilePicker(); folderPicker = new FolderPicker(); FileSelectCommand = new UnzipCommand(()=>SelectFile(),()=>true); FolderSelectCommand = new UnzipCommand(() => SelectFolder(), () => true); ExtractCommand = new UnzipCommand(() => Extract(), () => true); }