简体   繁体   English

UWP 多实例与多视图

[英]UWP multi-instance vs multiple views

I am working on a tabbed editor with multiple windows.我正在开发一个带有多个 windows 的选项卡式编辑器。 User can open new tabs to edit different files or open a new window to edit different sets of files, also drag and drop across windows is supported.用户可以打开新标签来编辑不同的文件或打开新的 window 来编辑不同的文件集,还支持在 windows 之间拖放。 I want to know which approach will be better, should I create multiple instances of the app or should I use multiple views to display different windows.我想知道哪种方法会更好,我应该创建应用程序的多个实例还是应该使用多个视图来显示不同的 windows。 What are the pros and cons of each approach??每种方法的优缺点是什么?

The specific display mode needs to be determined according to the actual usage of your application.具体的显示方式需要根据你应用的实际使用情况来确定。

The common design of UWP application is single instance and multiple views. UWP 应用程序的常见设计是单实例和多视图。 Multi-instance is only for desktop and IOT devices, and there are some restrictions on the background task, the specific content can check this document .多实例只针对桌面和物联网设备,对后台任务有一定的限制,具体内容可以查看这个文档

In your editor application, you can do different treatments for different situations.在您的编辑器应用程序中,您可以针对不同的情况进行不同的处理。

If the user only needs to edit a single file, then create multiple tabs under the current application view.如果用户只需要编辑单个文件,则在当前应用程序视图下创建多个选项卡。 If the user needs to edit or browse multiple files at the same time, you may consider adding a button in the editor so that the user can separate it into a new window.如果用户需要同时编辑或浏览多个文件,可以考虑在编辑器中增加一个按钮,以便用户将其分离成一个新的window。

About the application scenarios of multi-view, there are instructions in this document:关于多视图的应用场景,本文档中有说明:

Thanks.谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM