public InkDrawPictureViewViewModel() { LoadImageCommand = new DelegateCommand(async() => await OnLoadImageAsync()); SaveImageCommand = new DelegateCommand(async() => await OnSaveImageAsync(), CanSaveImage); ZoomInCommand = new DelegateCommand(() => _zoomService?.ZoomIn()); ZoomOutCommand = new DelegateCommand(() => _zoomService?.ZoomOut()); ResetZoomCommand = new DelegateCommand(() => _zoomService?.ResetZoom()); FitToScreenCommand = new DelegateCommand(() => _zoomService?.FitToScreen()); ClearAllCommand = new DelegateCommand(ClearAll, CanClearAll); }
public InkDrawViewModel() { ZoomInCommand = new DelegateCommand(() => _zoomService?.ZoomIn()); ZoomOutCommand = new DelegateCommand(() => _zoomService?.ZoomOut()); UndoCommand = new DelegateCommand(Undo, CanUndo); RedoCommand = new DelegateCommand(Redo, CanRedo); CutCommand = new DelegateCommand(Cut, CanCut); CopyCommand = new DelegateCommand(() => _copyPasteService?.Copy(), CanCopy); PasteCommand = new DelegateCommand(Paste, CanPaste); LoadInkFileCommand = new DelegateCommand(LoadInkFile); SaveInkFileCommand = new DelegateCommand(SaveInkFile, CanSaveInkFile); ExportAsImageCommand = new DelegateCommand(ExportAsImage, CanExportAsImage); ClearAllCommand = new DelegateCommand(ClearAll, CanClearAll); }
private void ZoomOut_Click(object sender, RoutedEventArgs e) => zoomService?.ZoomOut();