如何使用 C# 将 SaveFileDialog 设置为最顶层?
我想将我的 SaveFileDialog 设置为最顶层。但如你所知,没有财产。 还有其他方法可以在 SaveFileDialog 中设置 TopMost 吗?
I want to set topmost my SaveFileDialog. But as you know there is no property.
Is there any other way to set TopMost at SaveFileDialog?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我只能考虑一个 hack 来做到这一点。新建一个表单并将其设置为 TopMost。当您想显示对话框时,请从中调用:
Form1.cs
Form2.cs
I can only think on a hack to do this. Make a new Form and set it TopMost. When you want to show the dialog, call from it:
Form1.cs
Form2.cs
我解决了这个参考布鲁诺的答案:)
我的代码是这样的......
I solved this ref Bruno's answer :)
My code is this...
作为任何类型的 FileDialog 的更通用的 WPF-ish:
As a more generic WPF-ish for any type of FileDialog: