Dela via


ForegroundEnergyManager Class

Definition

Provides information about your app's foreground energy usage.

public ref class ForegroundEnergyManager abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ForegroundEnergyManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("Foreground Energy Manager has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
class ForegroundEnergyManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class ForegroundEnergyManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("Foreground Energy Manager has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
public static class ForegroundEnergyManager
Public Class ForegroundEnergyManager
Inheritance
Object Platform::Object IInspectable ForegroundEnergyManager
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The energy usage of a foreground app is classified into one these predefined levels, from lowest to highest energy consumption: LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, or ExcessiveUsageLevel.

Properties

ExcessiveUsageLevel

Gets the excessive usage level, expressed as a percentage of normal energy usage.

LowUsageLevel

Gets the low usage level, expressed as a percentage of normal energy consumption.

MaxAcceptableUsageLevel

Gets the maximum acceptable usage level, expressed as a percentage of normal energy consumption.

NearMaxAcceptableUsageLevel

Gets the near-maximum acceptable usage level, expressed as a percentage of normal energy usage.

RecentEnergyUsage

Gets the nearest predefined energy level of the foreground app for the current 30 minute period, equal to LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, or ExcessiveUsageLevel.

RecentEnergyUsageLevel

Gets the nearest predefined energy level of the foreground app for the current 30 minute period, equal to LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, or ExcessiveUsageLevel.

Events

RecentEnergyUsageIncreased

Occurs when the app's foreground energy usage has increased significantly.

RecentEnergyUsageReturnedToLow

Occurs when the app's energy usage has decreased to a low usage level.

Applies to