Skip to content

Instantly share code, notes, and snippets.

@0x414c49
Created January 20, 2020 14:11
Show Gist options
  • Save 0x414c49/15ca9500308cca513e3ecf8d1efda19c to your computer and use it in GitHub Desktop.
Save 0x414c49/15ca9500308cca513e3ecf8d1efda19c to your computer and use it in GitHub Desktop.
Mobile Bindings Razor
<StackLayout Orientation="StackOrientation.Horizontal"
HorizontalOptions="LayoutOptions.Center">
<Button Text="Increment" OnClick="@IncrementCount" />
<Label Text="@("The button was clicked " + count + " times")"
FontAttributes="FontAttributes.Bold"
VerticalTextAlignment="TextAlignment.Center" />
</StackLayout>
@code
{
int count;
void IncrementCount()
{
count++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment