Created
January 20, 2020 14:33
-
-
Save 0x414c49/f6452e393c2725ab4de66ee60b659983 to your computer and use it in GitHub Desktop.
Sample sensor using in BlazorMobileBindings
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 " + Battery.ToString())" | |
FontAttributes="FontAttributes.Bold" | |
VerticalTextAlignment="TextAlignment.Center" /> | |
</StackLayout> | |
@code | |
{ | |
double Battery | |
{ | |
get => Xamarin.Essentials.Battery.ChargeLevel; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment