FocusSessionManager.TryStartFocusSession Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TryStartFocusSession() |
Attempts to start a focus session with no fixed end time. Important The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support. |
TryStartFocusSession(DateTime) |
Attempts to start a focus session that is active until explicitly cancelled. Important The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support. |
TryStartFocusSession()
Attempts to start a focus session with no fixed end time.
Important
The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support.
public:
virtual FocusSession ^ TryStartFocusSession() = TryStartFocusSession;
/// [Windows.Foundation.Metadata.Overload("TryStartFocusSession")]
FocusSession TryStartFocusSession();
[Windows.Foundation.Metadata.Overload("TryStartFocusSession")]
public FocusSession TryStartFocusSession();
function tryStartFocusSession()
Public Function TryStartFocusSession () As FocusSession
Returns
A FocusSession object if a focus session was successfully started; otherwise, null.
- Attributes
Applies to
TryStartFocusSession(DateTime)
Attempts to start a focus session that is active until explicitly cancelled.
Important
The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support.
public:
virtual FocusSession ^ TryStartFocusSession(DateTime endTime) = TryStartFocusSession;
/// [Windows.Foundation.Metadata.Overload("TryStartFocusSession2")]
FocusSession TryStartFocusSession(DateTime const& endTime);
[Windows.Foundation.Metadata.Overload("TryStartFocusSession2")]
public FocusSession TryStartFocusSession(System.DateTimeOffset endTime);
function tryStartFocusSession(endTime)
Public Function TryStartFocusSession (endTime As DateTimeOffset) As FocusSession
Parameters
- endTime
- DateTime DateTimeOffset
The end time for the created focus session.
Returns
A FocusSession object if a focus session was successfully started; otherwise, null.
- Attributes
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for