BackgroundTaskBuilder.AllowRunningTaskInStandby Property
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.
Gets or sets a value that indicates whether the background task can run in standby mode.
public:
property bool AllowRunningTaskInStandby { bool get(); void set(bool value); };
/// [Windows.Foundation.Metadata.Experimental]
/// [get: Windows.Foundation.Metadata.Experimental]
/// [set: Windows.Foundation.Metadata.Experimental]
bool AllowRunningTaskInStandby();
void AllowRunningTaskInStandby(bool value);
bool AllowRunningTaskInStandby();
void AllowRunningTaskInStandby(bool value);
[Windows.Foundation.Metadata.Experimental]
public bool AllowRunningTaskInStandby { [Windows.Foundation.Metadata.Experimental] get; [Windows.Foundation.Metadata.Experimental] set; }
public bool AllowRunningTaskInStandby { get; set; }
var boolean = backgroundTaskBuilder.allowRunningTaskInStandby;
backgroundTaskBuilder.allowRunningTaskInStandby = boolean;
Public Property AllowRunningTaskInStandby As Boolean
Property Value
bool
This value is true
if the background task can run in standby mode; otherwise, false
.
- 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
The property allows developers to opt-in a background task registration to run in modern standby. When using the BackgroundTaskBuilder.Register(string) overload, running tasks in modern standby is not requested by default.