DesktopService is platform specific, so there is no need to check for Mac here. Just call DesktopService.ShowContextMenu(), and if it returns false, use the default code.