PowerManager.RemainingChargePercent 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得裝置上電池的剩餘電量百分比。
public:
static property int RemainingChargePercent { int get(); };
static int RemainingChargePercent();
public static int RemainingChargePercent { get; }
var int32 = PowerManager.remainingChargePercent;
Public Shared ReadOnly Property RemainingChargePercent As Integer
屬性值
Int32
int
電池的剩餘充電百分比。
備註
數據粒度會因系統而異,但最佳數據粒度為 1%。 這個屬性會對應至 GUID_BATTERY_PERCENTAGE_REMAINING電源設定 GUID。
適用於
另請參閱
- RemainingChargePercentChanged
- 使用應用程式生命週期 API
電源管理