简体   繁体   English

如何使Windows商店应用程序非全屏?

[英]How to make Windows store application non-fullscreen?

Question: 题:

I'm experimenting with a JavaScript application for Windows store. 我正在尝试使用Windows应用商店的JavaScript应用程序。 So far, everything works perfectly. 到目前为止,一切都很完美。

I wrote a little application that removes line numbers from source code that starts with line numbers ;) 我写了一个小应用程序,从源代码中删除以行号开头的行号;)

However, I do not find it useful that this app is forced to fullscreen mode. 但是,我发现此应用程序被强制为全屏模式并不有用。 This is against the concept of multitasking, since I expect this app to be used on the desktop while programming and wanting to copy-paste something from the internet, and not on an average tablet. 这违反了多任务处理的概念,因为我希望这个应用程序可以在编程时在桌面上使用,并且希望从互联网上复制粘贴内容,而不是普通的平板电脑。

Is there any way to create a windows store application that is non-fullscreen ? 有没有办法创建一个非全屏的Windows应用商店?

window.resizeTo( 640, 480 );

certainly isn't working. 肯定是行不通的。

With a very specific exception, you cannot control the size of your app. 除非特定的例外情况,否则您无法控制应用的大小。 There is no way to do what you are trying to do. 没有办法做你想做的事。 Only the user can control the size of your app, and they have specific, limited things that they can do (snapping, rotation, and moving to other monitors). 只有用户可以控制应用程序的大小,并且他们可以执行特定的,有限的操作(捕捉,旋转和移动到其他监视器)。

If your app is snapped—that is, if it's docked to the left or right side of the screen—you can request to unsnap. 如果你的应用程序被快照 - 也就是说,如果它停靠在屏幕的左侧或右侧 - 您可以请求取消隐藏。 You can't programmatically snap yourself to either side; 你无法以编程方式将自己抢到任何一方; you can only ask to unsnap yourself to take over the full screen. 你只能要求取消自己接管全屏。

Well the problem is that you have decided to create it for the windows store. 那么问题是你决定为windows商店创建它。 There are two types of tablets that will be coming out, the Windows RT tablet which will limit you to only installing stuff from the store, and the x86 variants which are essentially full PC's in tablet form. 有两种类型的平板电脑即将推出,Windows RT平板电脑将限制您只从商店安装东西,而x86变体基本上是平板电脑形式的完整PC。 The second type can allow you to install windowed applications that run just like on the desktop as well as the windows store applications which will all be in fullscreen. 第二种类型可以允许您安装窗口应用程序,这些应用程序就像在桌面上运行一样,以及windows存储应用程序,这些应用程序都将全屏显示。

If you definitely think you still want to do this as a store app you should look into the sharing paradigm that Microsoft is trying to promote. 如果您肯定认为您仍然希望将其作为商店应用程序执行此操作,那么您应该查看Microsoft正在尝试推广的共享范例。 Essentially you expose a bunch of 'contracts' for your application to send and receive different types of information such as pictures, text etc. Any app that has a matching contract for that datatype will be able to consume or provide that type of data. 基本上,您为应用程序公开了一堆“合同”,以发送和接收不同类型的信息,如图片,文本等。任何具有该数据类型的匹配合同的应用程序都将能够使用或提供该类型的数据。 That combined with the ability for the app to snap to one side or the other should give you enough flexibility to acheive what you described in your first post. 结合应用程序捕捉到一方或另一方的能力应该给你足够的灵活性来实现你在第一篇文章中描述的内容。

This is not possible. 这是不可能的。 It will launch in full screen. 它将全屏启动。 The only exception to this rule is if a user has already and snapped an app to a quarter of the screen. 此规则的唯一例外是,如果用户已经将应用程序捕捉到屏幕的四分之一。 At this point yours would snap to the remaining 3/4's. 在这一点上,你将与其余的3/4相媲美。

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

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