[英]Programmatically open a file from Xamarin.Mac solution
We have a Xamarin.Mac application which has to load/open a DOCX file programmatically from the application.我们有一个 Xamarin.Mac 应用程序,它必须以编程方式从应用程序加载/打开 DOCX 文件。
Can anyone let me know what would be the best way to programmatically open a file from the Xamarin.Mac solution and if this is related to providing special user permissions for the application?任何人都可以让我知道从 Xamarin.Mac 解决方案以编程方式打开文件的最佳方法是什么,以及这是否与为应用程序提供特殊用户权限有关?
You likely want你可能想要
NSWorkspace.SharedWorkspace.OpenFile (string)
https://developer.apple.com/reference/appkit/nsworkspace/1525235-openfile?language=objc https://developer.apple.com/reference/appkit/nsworkspace/1525235-openfile?language=objc
or或者
NSWorkspace.SharedWorkspace.OpenFile (string, string)
https://developer.apple.com/reference/appkit/nsworkspace/1524481-openfile?language=objc https://developer.apple.com/reference/appkit/nsworkspace/1524481-openfile?language=objc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.