.NET Core上的OpenFileDialog

编程入门 行业动态 更新时间:2024-10-17 23:34:45
本文介绍了.NET Core上的OpenFileDialog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在.NET Framework上,您可以使用System.Windows.Forms.OpenFileDialog通过本机Windows UI打开文件,但仅在Windows上有效.

On .NET Framework you can use System.Windows.Forms.OpenFileDialog for open files with the native Windows UI but that only works on Windows.

是否有针对.Net Core的System.Windows.Forms.OpenFileDialog实现或其他替代方案?

There is a System.Windows.Forms.OpenFileDialog implementation for .Net Core or another alternative?

推荐答案

.NET Core本身不包含任何UI的API.例如, docs. microsoft/en-us/dotnet/api/?view=netcore-2.0&term=File 显示没有任何相关内容.这也是.NET Core开发人员当前的立场: github/dotnet/core/issues/374

.NET Core itself does not include APIs for any UI. For example, docs.microsoft/en-us/dotnet/api/?view=netcore-2.0&term=File shows nothing relevant. This is also the current stance of .NET Core developers: github/dotnet/core/issues/374

有几种外部库可能在特定平台上运行:

There are several external libraries that may work on specific platforms:

  • github/AvaloniaUI/Avalonia
  • www.mono-project/docs/gui/gtksharp /
  • github/AvaloniaUI/Avalonia
  • www.mono-project/docs/gui/gtksharp/

如果您不是真的与.NET Core紧密联系. UWP(基于.NET Standard构建,但与.NET Core不同)也可以选择.

If you are not really tied to .NET Core itself. UWP (which builds on top of .NET Standard but is different from .NET Core) may be an option too.

更多推荐

.NET Core上的OpenFileDialog

本文发布于:2023-11-14 19:55:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1588371.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:NET   Core   OpenFileDialog

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!