public void PreviewItem(INavigateToItemDisplay itemDisplay) { // Because NavigateTo synchronously opens the file, and because // the NavigateTo UI automatically creates a NewDocumentStateScope, // preview can be accomplished by simply calling NavigateTo. // Navigation may fail to open the document, which can result in an exception // in expected cases if preview is not supported. CallWithCOMConvention handles // non-critical exceptions ErrorHandler.CallWithCOMConvention(() => itemDisplay.NavigateTo()); }
public void PreviewItem(INavigateToItemDisplay itemDisplay) { }
private NavigateToItemShim(INavigateToItemDisplay displayItem) { this.displayItem = displayItem ?? throw new ArgumentNullException(nameof(displayItem)); }