Skip to content

Commit 904abb8

Browse files
committed
Shorten tab labels
1 parent 0bbd7af commit 904abb8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

hub/apps/windows-app-sdk/applifecycle/applifecycle-power.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To use the app lifecycle API in the Windows App SDK:
2424

2525
The following example demonstrates how to subscribe and respond to [PowerManager](/windows/windows-app-sdk/api/winrt/microsoft.windows.system.power.powermanager) events. This code subscribes to the [BatteryStatusChanged](/windows/windows-app-sdk/api/winrt/microsoft.windows.system.power.powermanager.batterystatuschanged) event during startup. The app then responds to changes by checking the current power level and adjusting its resource usage appropriately. For example, if the battery discharges at a low power state, the app might defer any non-critical background work.
2626

27-
### [C++ sample](#tab/cpp)
27+
### [C++](#tab/cpp)
2828

2929
> [!NOTE]
3030
> Apps can register and unregister for these events at any time, but most apps will want to set callbacks in `WinMain` that persist as long as the app continues to run.
@@ -96,7 +96,7 @@ void OnPowerSupplyStatusChanged()
9696
}
9797
```
9898

99-
### [C# sample](#tab/csharp)
99+
### [C#](#tab/csharp)
100100

101101
> [!NOTE]
102102
> Apps can register and unregister for these events at any time, but most apps will want to set callbacks that persist as long as the app continues to run.
@@ -156,7 +156,7 @@ private void OnPowerSupplyStatusChanged()
156156

157157
[PowerManager](/windows/windows-app-sdk/api/winrt/microsoft.windows.system.power.powermanager) events are relatively low-level, and in some scenarios, a single event handler being called might not provide enough information for the app to decide how to behave. In this example, the [PowerSupplyStatusChanged](/windows/windows-app-sdk/api/winrt/microsoft.windows.system.power.powermanager.powersupplystatuschanged) event could be called when the device is disconnected from power. In that case, the app must check the current battery status before deciding how to proceed.
158158

159-
### [C++ sample](#tab/cpp)
159+
### [C++](#tab/cpp)
160160

161161
```cpp
162162
void DetermineWorkloads()
@@ -186,7 +186,7 @@ void DetermineWorkloads()
186186
}
187187
```
188188

189-
### [C# sample](#tab/csharp)
189+
### [C#](#tab/csharp)
190190

191191
```csharp
192192
private void DetermineWorkloads()
@@ -222,7 +222,7 @@ private void DetermineWorkloads()
222222

223223
The [PowerManager](/windows/windows-app-sdk/api/winrt/microsoft.windows.system.power.powermanager) class offers information about other device states relevant to an app's power usage. For example, apps can disable graphics processing when the device's display is turned off.
224224

225-
### [C++ sample](#tab/cpp)
225+
### [C++](#tab/cpp)
226226

227227
```cpp
228228
void OnDisplayStatusChanged()
@@ -257,7 +257,7 @@ void OnDisplayStatusChanged()
257257
}
258258
```
259259

260-
### [C# sample](#tab/csharp)
260+
### [C#](#tab/csharp)
261261

262262
```csharp
263263
private void OnDisplayStatusChanged()
@@ -288,7 +288,7 @@ private void OnDisplayStatusChanged()
288288

289289
Apps can register and deregister for notifications during their lifecycle. Use your language's preferred event registration management system if your app doesn't need to receive power status notifications during its entire lifecycle.
290290

291-
### [C++ sample](#tab/cpp)
291+
### [C++](#tab/cpp)
292292

293293
```cpp
294294
void UnregisterPowerManagerCallbacks()
@@ -302,7 +302,7 @@ void UnregisterPowerManagerCallbacks()
302302
}
303303
```
304304

305-
### [C# sample](#tab/csharp)
305+
### [C#](#tab/csharp)
306306

307307
```csharp
308308
private void UnregisterPowerManagerCallbacks()

0 commit comments

Comments
 (0)