void UpdateZoomCommand() { CommandCheckItems zoomCommand = ZoomCommand as CommandCheckItems; if (zoomCommand == null) { return; } zoomCommand.UpdateCheckState(UpdateZoomFactorCheckState); }
protected override ICommand CreateZoomModeAndZoomFactorItem(string dllName) { var items = CreateZoomModeAndFactorsItems(); CommandCheckItems setZoomModeAndFactor = new CommandCheckItems { Caption = DocumentViewerLocalizer.GetString(DocumentViewerStringId.CommandZoomCaption), Hint = DocumentViewerLocalizer.GetString(DocumentViewerStringId.CommandZoomDescription), Group = DocumentViewerLocalizer.GetString(DocumentViewerStringId.ZoomRibbonGroupCaption), Command = new DelegateCommand(() => { }, () => items.Any(x => x.CanExecute(null))), Items = items, SmallGlyph = UriHelper.GetUri(dllName, @"\Images\Zoom_16x16.png"), LargeGlyph = UriHelper.GetUri(dllName, @"\Images\Zoom_32x32.png"), }; return(setZoomModeAndFactor); }