BatteryReport Klasse

Definition

Stellt Eigenschaften bereit, die die Ladung, Kapazität und status des Akkus angeben. Weitere Informationen finden Sie unter Abrufen von Akkuinformationen.

public ref class BatteryReport sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BatteryReport final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BatteryReport
Public NotInheritable Class BatteryReport
Vererbung
Object Platform::Object IInspectable BatteryReport
Attribute

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Hinweise

Alle Eigenschaften in BatteryReport geben NULL zurück, wenn der Akku nicht vorhanden ist oder der Wert nicht vom Batteriecontroller gemeldet wird.

Eigenschaften

ChargeRateInMilliwatts

Ruft die Rate ab, mit der der Akku geladen wird.

DesignCapacityInMilliwattHours

Ruft die geschätzte Energiekapazität eines neuen Akkus dieses Typs ab.

FullChargeCapacityInMilliwattHours

Ruft die vollständig geladene Energiekapazität des Akkus ab.

RemainingCapacityInMilliwattHours

Ruft die verbleibende Stromkapazität des Akkus ab.

Status

Ruft eine BatteryStatus-Enumeration ab, die die status des Akkus angibt.

Gilt für:

Weitere Informationen