Dela via


FocusSession Class

Definition

Represents a focus session.

Important

The Windows.UI.Shell.FocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.

public ref class FocusSession sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 983040)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class FocusSession final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 983040)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class FocusSession
Public NotInheritable Class FocusSession
Inheritance
Object Platform::Object IInspectable FocusSession
Attributes

Windows requirements

Device family
Windows 11 Insider Preview (introduced in 10.0.23504.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v15.0)

Remarks

Get an instance of this class by calling one of the overloads of TryStartFocusSession or GetSession.

Properties

Id

Gets a platform-assigned unique identifier for a focus session.

Methods

End()

Ends the focus session.

Important

The FocusSession.End API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.

Applies to