此主题尚未评级 - 评价此主题

LaunchActivatedEventArgs Class

应用程序启动时提供事件信息。

JavaScript:  此类型显示为 WebUILaunchActivatedEventArgs

语法


public sealed class LaunchActivatedEventArgs : Object,
    ILaunchActivatedEventArgs,
    IActivatedEventArgs

特性

MarshalingBehaviorAttribute(Agile)
VersionAttribute(NTDDI_WIN8)

成员

LaunchActivatedEventArgs类 具有以下类型的成员:

方法

The LaunchActivatedEventArgs 类 继承以下内容中的方法 Object 类.

属性

LaunchActivatedEventArgs类 具有以下属性。

属性访问类型描述

Arguments

只读Gets the arguments that are passed to the app during its launch activation.

Kind

只读Gets the reason that this app is being activated.

PreviousExecutionState

只读Gets the execution state of the app before this activation.

SplashScreen

只读Gets the splash screen object that provides information about the transition from the splash screen to the activated app.

TileId

只读Gets the ID of the source that was invoked to launch the application.

 

备注

ActivationKindLaunch时,当您响应 Activated 事件,此对象会被访问。

如果可能会大幅增加启动应用程序所需的时间,请避免在启动期间执行任务。代之以的是,您可以通过侦听 SplashScreen.Dismissed 事件触发其他加载任务。

在激活过程中不能使用激活延迟对象来完成复杂的任务。激活(包括延迟的激活)期间出现的任何未处理错误或异常都将导致应用程序崩溃。如果需要在激活期间执行网络调用或处理若干附加文件,请考虑将您的应用程序启动到一个扩展的初始屏幕,然后执行这些操作。有关更多信息,请参见如何显示延长时间的初始屏幕

要点   系统可能会终止需要大量时间才能启动的应用程序。

当测试您的应用程序时,如果初始屏幕仍可见,请注意立即重新激活已终止将导致生成失败启动的应用程序。

JavaScript 启动完成

如果用 Javascript 编程,则在您激活的事件处理程序在执行您的启动任务之后成功返回时完成启动。

.NET 启动完成

如果用 C#、VB 或 C++ 编程,则在您激活应用程序窗口时即完成启动。

要求

最低受支持的客户端

Windows 8 [仅 Windows 应用商店应用]

最低受支持的服务器

Windows Server 2012 [仅 Windows 应用商店应用]

最低受支持的电话

Windows Phone 8

命名空间

Windows.ApplicationModel.Activation
Windows::ApplicationModel::Activation [C++]

元数据

Windows.winmd

另请参阅

Windows.UI.Core.CoreApplicationView.Activated

 

 

本文是否对您有所帮助?
(1500 个剩余字符)
© 2013 Microsoft. 版权所有。