Share via


HolographicApplicationPreview.IsHolographicActivation 方法

定义

获取给定的应用激活是否针对全息 shell。

public:
 static bool IsHolographicActivation(IActivatedEventArgs ^ activatedEventArgs);
 static bool IsHolographicActivation(IActivatedEventArgs const& activatedEventArgs);
public static bool IsHolographicActivation(IActivatedEventArgs activatedEventArgs);
function isHolographicActivation(activatedEventArgs)
Public Shared Function IsHolographicActivation (activatedEventArgs As IActivatedEventArgs) As Boolean

参数

activatedEventArgs
IActivatedEventArgs

要检查的应用激活。

返回

Boolean

bool

激活是否针对全息 shell。

注解

在台式电脑上,如果用户具有混合现实头戴显示设备,则可以从桌面“开始”菜单或全息“开始”菜单启动应用。 用户还可以通过桌面或全息 shell 中的协议激活来激活应用程序,例如单击当前位于该 shell 中的另一个应用中的链接。 此方法允许应用推断给定应用激活是否面向全息 shell,这可能会影响应用选择初始化其视图的方式。

在 HoloLens 上,对于所有激活,这将返回 true。

适用于