Share via


ActivationViewSwitcher 類別

定義

提供切換至應用程式檢視以回應啟用的方法。

public ref class ActivationViewSwitcher sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ActivationViewSwitcher final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ActivationViewSwitcher
Public NotInheritable Class ActivationViewSwitcher
繼承
Object Platform::Object IInspectable ActivationViewSwitcher
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

從啟用事件引數的ViewSwitcher屬性取得ActivationViewSwitcher的實例。 若要使用 ActivationViewSwitcher ,您必須先呼叫 DisableSystemViewActivationPolicy來停用系統檢視啟用原則。 應用程式的第一次啟用無法使用 ActivationViewSwitcher 來控制要顯示的檢視。 應用程式只能在後續啟用中使用。

方法

IsViewPresentedOnActivationVirtualDesktop(Int32)

傳回值,這個值表示指定的檢視是否存在於啟動起始的虛擬桌面上。

ShowAsStandaloneAsync(Int32)

在新的獨立視窗中顯示檢視。

ShowAsStandaloneAsync(Int32, ViewSizePreference)

在新的獨立視窗中顯示檢視,並設定檢視的大小喜好設定。

適用於