BackgroundWorkCost.AppEnergyUseLevel 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 the energy consumption level of the background task.
public:
static property EnergyUseLevel AppEnergyUseLevel { EnergyUseLevel get(); };
/// [Windows.Foundation.Metadata.Experimental]
/// [get: Windows.Foundation.Metadata.Experimental]
static EnergyUseLevel AppEnergyUseLevel();
static EnergyUseLevel AppEnergyUseLevel();
[Windows.Foundation.Metadata.Experimental]
public static EnergyUseLevel AppEnergyUseLevel { [Windows.Foundation.Metadata.Experimental] get; }
public static EnergyUseLevel AppEnergyUseLevel { get; }
var energyUseLevel = BackgroundWorkCost.appEnergyUseLevel;
Public Shared ReadOnly Property AppEnergyUseLevel As EnergyUseLevel
Property Value
The energy consumption level of the background task, returned as a value of the EnergyUseLevel enumeration.
- 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
This property allows a developer to check if their application's background tasks have been throttled in modern standby.
If the AppEnergyUseLevel is EnergyUseLevel.OverBudget, it indicates that an application's energy use is over the budget and its background tasks are subject to being throttled in modern standby. Once the system is not in modern standby, those tasks that were throttled may be activated.