Created
January 20, 2020 15:06
-
-
Save 0x414c49/93f1ad66b3129ca0ff74297f36a0ec55 to your computer and use it in GitHub Desktop.
Battery component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StackLayout Orientation="StackOrientation.Horizontal" | |
HorizontalOptions="LayoutOptions.Center"> | |
<Label Text="@("Battery level is " + BatteryLevel.ToString())" | |
FontAttributes="FontAttributes.Bold" | |
VerticalTextAlignment="TextAlignment.Center" /> | |
</StackLayout> | |
@code | |
{ | |
double BatteryLevel | |
{ | |
get => Xamarin.Essentials.Battery.ChargeLevel; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment