BatteryLifePercent Property

Vista Bridge Library

[This is preliminary documentation and is subject to change.]

Gets a value that indicates the remaining battery life (as a percentage of the full battery charge). This value is in the range 0-100, where 0 is not charged and 100 is fully charged.

Namespace:  Microsoft.SDK.Samples.VistaBridge.Library.PowerManagement
Assembly:  VistaBridgeLibrary (in VistaBridgeLibrary.dll) Version: 1.4.0.0 (1.4.0.0)

Syntax

C#
public static int BatteryLifePercent { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property BatteryLifePercent As Integer
Visual C++
public:
static property int BatteryLifePercent {
	int get ();
}

Field Value

An Int32 value.

Exceptions

ExceptionCondition
System..::.InvalidOperationExceptionThe system does not have a battery.
System..::.PlatformNotSupportedExceptionRequires Vista/Windows Server 2008.

See Also