Battery クラス

定義

電話機のバッテリーの状態に関する情報を提供します。

public ref class Battery sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Phone.PhoneContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class Battery final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Phone.PhoneContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class Battery
Public NotInheritable Class Battery
継承
Object Platform::Object IInspectable Battery
属性

Windows の要件

デバイス ファミリ
Windows Mobile Extension SDK (10.0.10240.0 で導入)
API contract
Windows.Phone.PhoneContract (v1.0 で導入)

注釈

Battery クラスのインスタンスを取得するには、 GetDefault メソッドを使用します。

プロパティ

RemainingChargePercent

携帯電話のバッテリーに残っている充電の割合を示す値を取得します。

RemainingDischargeTime

電話機のバッテリーが完全に放電されるまでの時間を見積もる値を取得します。 各単位値は 100 ナノ秒を表します。

メソッド

GetDefault()

電話の既定の Battery オブジェクトを取得します。

イベント

RemainingChargePercentChanged

RemainingChargePercent の値が 1% 減少したときに発生します。

適用対象